diff --git a/src/api/api.dependencies.ts b/src/api/api.dependencies.ts index 6f7ce27..478c97d 100644 --- a/src/api/api.dependencies.ts +++ b/src/api/api.dependencies.ts @@ -1,7 +1,6 @@ import { Result } from '@alien-worlds/api-core'; import { DatabaseConfigBuilder, Dependencies } from '../common'; import { Api } from './api'; -import { ApiConfig } from './api.types'; /** * An abstract class representing a Api dependencies. @@ -9,8 +8,7 @@ import { ApiConfig } from './api.types'; */ export abstract class ApiDependencies extends Dependencies { public api: Api; - public databaseConfigBuilder: DatabaseConfigBuilder; - public abstract initialize(config: ApiConfig): Promise; + public abstract initialize(): Promise; } diff --git a/src/api/start-api.ts b/src/api/start-api.ts index 8de318d..5465dd1 100644 --- a/src/api/start-api.ts +++ b/src/api/start-api.ts @@ -11,10 +11,10 @@ export const startApi = async ( routes: Route[] = [], ...args: string[] ) => { - const { api } = dependencies; + const { api, databaseConfigBuilder } = dependencies; const vars = new ConfigVars(); const options = apiCommand.parse(args).opts(); - const config = buildApiConfig(vars, dependencies.databaseConfigBuilder, options); + const config = buildApiConfig(vars, databaseConfigBuilder, options); api.setup(config);