mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-25 20:18:25 +02:00
Better arg parsing for main
This commit is contained in:
parent
2e7862043d
commit
f9e91987ac
3 changed files with 28 additions and 19 deletions
|
@ -107,13 +107,13 @@ exports.getModule = class WebServerModule extends ServerModule {
|
|||
route = new Route(route);
|
||||
|
||||
if(!route.isValid()) {
|
||||
Log( { route : route }, 'Cannot add route: missing or invalid required members' );
|
||||
Log.warn( { route : route }, 'Cannot add route: missing or invalid required members' );
|
||||
return false;
|
||||
}
|
||||
|
||||
const routeKey = route.getRouteKey();
|
||||
if(routeKey in this.routes) {
|
||||
Log( { route : route }, 'Cannot add route: duplicate method/path combination exists' );
|
||||
Log.warn( { route : route }, 'Cannot add route: duplicate method/path combination exists' );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue