.
This commit is contained in:
parent
7a224178a3
commit
32fe3d7e79
@ -138,6 +138,7 @@ const extraControllers = {
|
||||
return new Promise(function (resolve) {
|
||||
let _userDevices = [];
|
||||
userDevices.forEach(async function (userDevice) {
|
||||
console.log(userDevice);
|
||||
if (!userDeviceService.isValidPushToken(userDevice.token)) {
|
||||
await disableUserDevicePromise(userDevice.token);
|
||||
} else {
|
||||
@ -236,9 +237,7 @@ const extraControllers = {
|
||||
getUserIds()
|
||||
])
|
||||
.then(function(result) {
|
||||
let notification = result[0];
|
||||
notificationRecord.id = notification.id;
|
||||
|
||||
notificationRecord = result[0];
|
||||
userIds = result[1];
|
||||
|
||||
userIds.forEach(function (userId) {
|
||||
@ -249,7 +248,7 @@ const extraControllers = {
|
||||
return Promise.all(getUserDevicesList)
|
||||
}).then(function (userDeviceList) {
|
||||
console.log(userDeviceList);
|
||||
return new Promise(function(resolve) { resolve(userDeviceList[0]); });
|
||||
return new Promise(function(resolve) { resolve(userDeviceList); });
|
||||
})
|
||||
.then(disableInvalidUserDevicesPromise)
|
||||
.then(buildMessagesPromise)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user