From cc0416c67e201118c025c60e5f229afd56de9a04 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Sat, 16 Nov 2019 20:04:00 -0500 Subject: [PATCH] change loading --- src/api/Server.ts | 3 +-- src/class/Route.ts | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/api/Server.ts b/src/api/Server.ts index 0d5927a..bc36325 100644 --- a/src/api/Server.ts +++ b/src/api/Server.ts @@ -33,8 +33,7 @@ export default class Server { if (routeFile === 'index.js') return; try { // eslint-disable-next-line new-cap - const route: Route = new (require(`${__dirname}/routes/${routeFile}`).default)(this); - this.client.signale.debug(route); + const route = new (require(`${__dirname}/routes/${routeFile}`).default)(this); route.bind(); this.routes.set(route.conf.path, route); this.app.use(route.conf.path, route.router); diff --git a/src/class/Route.ts b/src/class/Route.ts index 8004fc5..a71af87 100644 --- a/src/class/Route.ts +++ b/src/class/Route.ts @@ -11,9 +11,7 @@ export default class Route { constructor(server: Server, conf: { path: string, deprecated?: boolean }) { this.server = server; this.router = router(); - this.conf.path = conf.path; - if (conf.deprecated === undefined) this.conf.deprecated = false; - else this.conf.deprecated = conf.deprecated; + this.conf = conf; } public bind() {}