From 7c0ca981a4ddf2c3c72dea0ae4e5c29a6b55500d Mon Sep 17 00:00:00 2001 From: rkamysz Date: Tue, 25 Jul 2023 13:53:49 +0200 Subject: [PATCH] bugfix order framework --- src/api/start-api.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/api/start-api.ts b/src/api/start-api.ts index a4fe4c9..f0ce1c1 100644 --- a/src/api/start-api.ts +++ b/src/api/start-api.ts @@ -11,14 +11,13 @@ export const startApi = async (dependencies: ApiDependencies, ...args: string[]) const vars = new ConfigVars(); const options = apiCommand.parse(args).opts(); const config = buildApiConfig(vars, databaseConfigBuilder, options); - const routes = routesProvider(ioc); await setupIoc(config, ioc); api.setup(config); - routes.forEach(route => { - Route.mount(api, route); + routesProvider(ioc).forEach(route => { + Route.mount(api.framework, route); }); return api.start();