mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-25 22:55:52 -05:00
Remove unneeded switch labels
This commit is contained in:
parent
ad6ff11413
commit
65ad724546
15
meshuser.js
15
meshuser.js
@ -553,21 +553,16 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
||||
|
||||
var commandHandler = serverCommands[command.action];
|
||||
if (commandHandler != null) {
|
||||
try { commandHandler(command); return;
|
||||
} catch (e) {
|
||||
try { commandHandler(command); return; }
|
||||
catch (e) {
|
||||
console.log('Unhandled error while processing ' + command.action + ' for user ' + user.name + ':\n' + e);
|
||||
parent.parent.logError(e.stack);
|
||||
return;
|
||||
parent.parent.logError(e.stack); return; // todo: remove returns when switch is gone
|
||||
}
|
||||
} else {
|
||||
} else { }
|
||||
// console.log('Unknown action from user ' + user.name + ': ' + command.action + '.');
|
||||
// pass through to switch statement
|
||||
}
|
||||
// pass through to switch statement until refactoring complete
|
||||
|
||||
switch (command.action) {
|
||||
// Avoid logging 'Unknown action...' for refactored commands
|
||||
case 'lastconnect':
|
||||
case 'serverconsole':
|
||||
case 'pong': { break; } // NOP
|
||||
case 'ping': { try { ws.send('{action:"pong"}'); } catch (ex) { } break; }
|
||||
case 'intersession':
|
||||
|
Loading…
Reference in New Issue
Block a user