mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-26 07:05:52 -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);
|
||||
process.exit();
|
||||
} 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;
|
||||
}
|
||||
case 'loginTokens': {
|
||||
|
Loading…
Reference in New Issue
Block a user