fix amt json import naming bug

Signed-off-by: si458 <simonsmith5521@gmail.com>

si458 committed Jun 18, 2025 at 19:35 UTC c6d8428725a8ed95b33744cc5fd3751065c0df45
1 file changed +1 -1
meshuser.js
+1 -1
@@ -5493,7 +5493,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
5493 // Create a new Intel AMT device
5494 const nodeid = 'node/' + domain.id + '/' + parent.crypto.randomBytes(48).toString('base64').replace(/\+/g, '@').replace(/\//g, '$');
5495 const device = { type: 'node', _id: nodeid, meshid: mesh._id, mtype: 1, icon: 1, host: importDev.fqdn, domain: domain.id, intelamt: { user: 'admin', state: 2 } };
5496 - if (typeof importDev.name == 'string') { device.name = importDev.name; } else { device.name = importDev.host; }
5496 + if (typeof importDev.name == 'string') { device.name = importDev.name; } else { device.name = importDev.fqdn; }
5497
5498 // Add optional fields
5499 if (typeof importDev.username == 'string') { device.intelamt.user = importDev.username; }