From bb272881fb5cb70b312deda1d44f5d1e69a4bdce Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Wed, 9 Nov 2022 16:35:39 +0200 Subject: [PATCH] fix old references --- src/server/database/MariaDB.js | 1 - src/server/interfaces/Endpoint.js | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) 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); } }