mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-01 21:13:09 +00:00
Market over embassy (#404)
* marketplace proxy'd through embassy * http not rpc * fix up marketplace
This commit is contained in:
@@ -5,6 +5,7 @@ import { ConfigService } from '../config.service'
|
||||
import { PatchDbService } from '../patch-db/patch-db.service'
|
||||
import { MarketplaceLiveApiService } from './marketplace/marketplace-live-api.service'
|
||||
import { MarketplaceMockApiService } from './marketplace/marketplace-mock-api.service'
|
||||
import { ApiService } from './embassy/embassy-api.service'
|
||||
|
||||
export function ApiServiceFactory (config: ConfigService, http: HttpService) {
|
||||
if (config.mocks.enabled) {
|
||||
@@ -14,10 +15,10 @@ export function ApiServiceFactory (config: ConfigService, http: HttpService) {
|
||||
}
|
||||
}
|
||||
|
||||
export function MarketplaceApiServiceFactory (config: ConfigService, http: HttpService, patch: PatchDbService) {
|
||||
export function MarketplaceApiServiceFactory (config: ConfigService, patch: PatchDbService, apiService: ApiService) {
|
||||
if (config.mocks.enabled) {
|
||||
return new MarketplaceMockApiService(http, config, patch)
|
||||
return new MarketplaceMockApiService(config, patch)
|
||||
} else {
|
||||
return new MarketplaceLiveApiService(http, config, patch)
|
||||
return new MarketplaceLiveApiService(apiService, config, patch)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user