fix old references

This commit is contained in:
Erik 2022-11-09 16:35:39 +02:00
parent 9d3fe5f2c2
commit bb272881fb
Signed by: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB
2 changed files with 2 additions and 3 deletions

View File

@ -10,7 +10,6 @@ class MariaDB {
if (!server) Util.fatal(new Error('Missing reference to server!'));
if (!config) Util.fatal(new Error('No config options provided!'));
this.client = server;
this.config = config;
this.pool = null;

View File

@ -31,13 +31,13 @@ class Endpoint {
for (const [ method, cb, mw = [] ] of this.methods) {
if (typeof method !== 'string') throw new Error(`Invalid method parameter type in Endpoint ${this.name} major path`);
this.client.app[method](this.path, ...this.middleware, ...mw, cb);
this.server.app[method](this.path, ...this.middleware, ...mw, cb);
}
this.subpaths = [ ...this._subpaths, ...this.subpaths ];
for (const [ sub, method, cb, mw = [] ] of this.subpaths) {
if (typeof method !== 'string') throw new Error(`Invalid method parameter type in Endpoint ${this.name} subpath ${sub}`);
this.client.app[method](this.path + sub, ...this.middleware, ...mw, cb);
this.server.app[method](this.path + sub, ...this.middleware, ...mw, cb);
}
}