39 |
await this.router.loadRoutes(); |
await this.router.loadRoutes(); |
40 |
|
|
41 |
for (const route of this.router.routes) { |
for (const route of this.router.routes) { |
42 |
console.log(route.callback[1], route.callback[0].middleware()[route.callback[1]]); |
// console.log(route.callback[1], route.callback[0].middleware()[route.callback[1]]); |
43 |
expressRouter[route.method.toLowerCase() as methods](route.path, ...(route.callback[0].middleware()[route.callback[1]] as any[] ?? []), ...route.middlewareList as any[], await route.getCallbackFunction()); |
expressRouter[route.method.toLowerCase() as methods](route.path, ...(route.callback[0].middleware()[route.callback[1]] as any[] ?? []), ...route.middlewareList as any[], await route.getCallbackFunction()); |
44 |
} |
} |
45 |
|
|