mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-01-13 16:03:20 -05:00
Fixed MeshCtrl.js, #3999
This commit is contained in:
parent
e9cff97905
commit
b7231e00e4
12
meshctrl.js
12
meshctrl.js
@ -2187,8 +2187,18 @@ function serverConnect() {
|
|||||||
console.log(data.result);
|
console.log(data.result);
|
||||||
process.exit();
|
process.exit();
|
||||||
} else {
|
} else {
|
||||||
ws.send(JSON.stringify({ action: 'loginTokens', responseid: 'meshctrl' }));
|
if (args.json) {
|
||||||
|
console.log(data);
|
||||||
|
} else {
|
||||||
|
console.log("New login token created.");
|
||||||
|
if (data.name) { console.log("Token name: " + data.name); }
|
||||||
|
if (data.created) { console.log("Created: " + new Date(data.created).toLocaleString()); }
|
||||||
|
if (data.expire) { console.log("Expire: " + new Date(data.expire).toLocaleString()); }
|
||||||
|
if (data.tokenUser) { console.log("Username: " + data.tokenUser); }
|
||||||
|
if (data.tokenPass) { console.log("Password: " + data.tokenPass); }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
process.exit();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'loginTokens': {
|
case 'loginTokens': {
|
||||||
|
Loading…
Reference in New Issue
Block a user