mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-07-20 05:58:50 -04:00
fix amt json import naming bug
Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
parent
809451741e
commit
c6d8428725
@ -5493,7 +5493,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
|||||||
// Create a new Intel AMT device
|
// Create a new Intel AMT device
|
||||||
const nodeid = 'node/' + domain.id + '/' + parent.crypto.randomBytes(48).toString('base64').replace(/\+/g, '@').replace(/\//g, '$');
|
const nodeid = 'node/' + domain.id + '/' + parent.crypto.randomBytes(48).toString('base64').replace(/\+/g, '@').replace(/\//g, '$');
|
||||||
const device = { type: 'node', _id: nodeid, meshid: mesh._id, mtype: 1, icon: 1, host: importDev.fqdn, domain: domain.id, intelamt: { user: 'admin', state: 2 } };
|
const device = { type: 'node', _id: nodeid, meshid: mesh._id, mtype: 1, icon: 1, host: importDev.fqdn, domain: domain.id, intelamt: { user: 'admin', state: 2 } };
|
||||||
if (typeof importDev.name == 'string') { device.name = importDev.name; } else { device.name = importDev.host; }
|
if (typeof importDev.name == 'string') { device.name = importDev.name; } else { device.name = importDev.fqdn; }
|
||||||
|
|
||||||
// Add optional fields
|
// Add optional fields
|
||||||
if (typeof importDev.username == 'string') { device.intelamt.user = importDev.username; }
|
if (typeof importDev.username == 'string') { device.intelamt.user = importDev.username; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user