This commit is contained in:
Evgenii Abramov
2021-03-30 21:39:23 +03:00
parent cc3b0779a0
commit 736529aa4a
2 changed files with 6 additions and 5 deletions

View File

@@ -35,8 +35,7 @@ module.exports.devices = [
};
for (const d of global.devices) {
console.log(d);
const {allowedUsers} = d.custom_data;
const {allowedUsers} = d.meta;
if (Array.isArray(allowedUsers) && allowedUsers.indexOf(userId)) {
console.log(d.getInfo());
r.payload.devices.push(d.getInfo());