prepend slash if missing
This commit is contained in:
parent
0f71c25cdb
commit
9d3fe5f2c2
@ -7,6 +7,7 @@ class Endpoint {
|
||||
this.server = server;
|
||||
|
||||
if (!path) Util.fatal(new Error('Missing path in endpoint'));
|
||||
if (!path.startsWith('/')) path = `/${path}`;
|
||||
this.path = path;
|
||||
|
||||
if (name) this.name = name;
|
||||
|
Loading…
Reference in New Issue
Block a user