diff --git a/modules/notification/notification.controller.js b/modules/notification/notification.controller.js index d93e20b..45cfbd7 100644 --- a/modules/notification/notification.controller.js +++ b/modules/notification/notification.controller.js @@ -248,7 +248,13 @@ const extraControllers = { return Promise.all(getUserDevicesList) }).then(function (userDeviceList) { console.log(userDeviceList); - return new Promise(function(resolve) { resolve(userDeviceList); }); + let result = []; + userDeviceList.forEach(function (elements) { + elements.forEach(function (item) { + result.push(item) + }) + }); + return new Promise(function (resolve) { resolve(result); }); }) .then(disableInvalidUserDevicesPromise) .then(buildMessagesPromise)