prep for live mocks

This commit is contained in:
Matt Hill
2021-06-14 17:02:26 -06:00
committed by Aiden McClelland
parent 21dd8fa618
commit c5f2379c6e
11 changed files with 69 additions and 101 deletions

View File

@@ -4,9 +4,9 @@ import { LiveApiService } from './live-api.service'
import { ConfigService } from '../config.service'
export function ApiServiceFactory (config: ConfigService, http: HttpService) {
if (config.api.mocks) {
return new MockApiService(config)
if (config.mocks.enabled) {
return new MockApiService(http)
} else {
return new LiveApiService(http, config)
return new LiveApiService(http)
}
}