我有一个应用程序并使用函数 sendNotificationByDeviceIds,如下所示:
PushNotificationToConsumer: function(req, res) {
queryCustomer.find({jpay_no : jpay_no}).done(function(customerReturn){
if(customerReturn.length > 0){
var device_id = customerReturn[0].attributes.device_id.toString();
req.ibmpush.sendNotificationByDeviceIds(message, [device_id], null).then(function(response){
res.json({success : true, message : 'Send notification to patient with device_id:' +device_id+ ' successful ' });
},function(err){
res.json(err);
});
}else{
}
}, function(err){
res.json(err);
})
}
错误信息:
在 app.js 上:我声明了 ibmpush = require('ibmpush')
请帮忙告诉我你的想法。谢谢
我是一名优秀的程序员,十分优秀!