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