박찬수

푸쉬 기능 수정

Showing 1 changed file with 20 additions and 24 deletions
......@@ -58,30 +58,26 @@ function Multicast(sendMsg){
});
}
function Broadcast(msg){
request.post(
{
url: BROAD_TARGET_URL,
headers: {
'Authorization': `Bearer ${TOKEN}`
},
json: {
"messages":[
{
"type":"text",
"text":msg
}
]
}
},(error, response, body) => {
console.log(body)
});
}
exports.SendMessage = function(sendMessage){
Multicast(sendMessage);
Broadcast(sendMessage);
}
\ No newline at end of file
// // Broadcast
// request.post(
// {
// url: BROAD_TARGET_URL,
// headers: {
// 'Authorization': `Bearer ${TOKEN}`
// },
// json: {
// "messages":[
// {
// "type":"text",
// "text":"This is broadcast message."
// },
// {
// "type":"text",
// "text":"May I help you?"
// }
// ]
// }
// },(error, response, body) => {
// console.log(body)
// });
\ No newline at end of file
......