This commit is contained in:
Evgenii Abramov
2021-03-30 21:28:48 +03:00
parent 8366028550
commit be9acc37e4

View File

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