박찬수

푸쉬 기능 수정

Showing 1 changed file with 21 additions and 25 deletions
......@@ -58,30 +58,26 @@ function Multicast(sendMsg){
});
}
exports.SendMessage = function(sendMessage){
Multicast(sendMessage);
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)
});
}
// // 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
exports.SendMessage = function(sendMessage){
Broadcast(sendMessage);
}
\ No newline at end of file
......