Better arg parsing for main
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user