diff --git a/src/server/database/MariaDB.js b/src/server/database/MariaDB.js index 74f1143..fd2f78f 100644 --- a/src/server/database/MariaDB.js +++ b/src/server/database/MariaDB.js @@ -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; diff --git a/src/server/interfaces/Endpoint.js b/src/server/interfaces/Endpoint.js index f7d1ccd..731222a 100644 --- a/src/server/interfaces/Endpoint.js +++ b/src/server/interfaces/Endpoint.js @@ -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); } }