mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Added staring a device feature.
This commit is contained in:
parent
fe4b71dbed
commit
2d677298db
11 changed files with 159 additions and 30 deletions
|
@ -4219,7 +4219,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
|||
case 'userWebState': {
|
||||
if (common.validateString(command.state, 1, 10000) == false) break; // Check state size, no more than 10k
|
||||
command.state = parent.filterUserWebState(command.state); // Filter the state to remove anything bad
|
||||
if ((command.state == null) || (typeof command.state !== 'object')) break; // If state did not validate correctly, quit here.
|
||||
if ((command.state == null) || (typeof command.state !== 'string')) { console.log('tt'); break; } // If state did not validate correctly, quit here.
|
||||
db.Set({ _id: 'ws' + user._id, state: command.state });
|
||||
parent.parent.DispatchEvent([user._id], obj, { action: 'userWebState', nolog: 1, domain: domain.id, state: command.state });
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue