gpt4 book ai didi

angularjs - IBM推送: cannot use sendNotificationByDeviceIds in ibmpush. js

转载 作者:太空宇宙 更新时间:2023-11-03 22:28:52 27 4
gpt4 key购买 nike

我有一个应用程序并使用函数 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);
})

}

错误信息: enter image description here

在 app.js 上:我声明了 ibmpush = require('ibmpush')

请帮忙告诉我你的想法。谢谢

最佳答案

ibmpush 是一个已弃用的 Node 包。

https://www.npmjs.com/package/ibmpush

ATTENTION: This service is currently deprecated on Bluemix and will be completely removed shortly. Please use the 2nd generation of Bluemix MobileFirst Services.

您可以使用当前的 Push Swagger 文档来实现您正在寻找的功能(使用 REST API 调用):

https://mobile.ng.bluemix.net/imfpush/

关于angularjs - IBM推送: cannot use sendNotificationByDeviceIds in ibmpush. js,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40882046/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com