diff --git a/frontend/projects/ui/src/app/pages/marketplace-routes/marketplace.service.ts b/frontend/projects/ui/src/app/pages/marketplace-routes/marketplace.service.ts index 69d7a60e3..5fbee8c97 100644 --- a/frontend/projects/ui/src/app/pages/marketplace-routes/marketplace.service.ts +++ b/frontend/projects/ui/src/app/pages/marketplace-routes/marketplace.service.ts @@ -24,14 +24,14 @@ export class MarketplaceService { } = {} marketplaceUrl: string - constructor( + constructor ( private readonly api: ApiService, private readonly emver: Emver, private readonly patch: PatchDbService, private readonly config: ConfigService, - ) {} + ) { } - init(): Subscription { + init (): Subscription { return this.patch.watch$('ui', 'marketplace').subscribe(marketplace => { if (!marketplace || !marketplace['selected-id']) { this.marketplaceUrl = this.config.marketplace.url @@ -42,7 +42,7 @@ export class MarketplaceService { }) } - async load(): Promise { + async load (): Promise { try { const [data, pkgs] = await Promise.all([ this.getMarketplaceData({}), @@ -67,7 +67,7 @@ export class MarketplaceService { } } - async getUpdates(localPkgs: { + async getUpdates (localPkgs: { [id: string]: PackageDataEntry }): Promise { const id = this.patch.getData().ui.marketplace?.['selected-id'] @@ -95,7 +95,7 @@ export class MarketplaceService { }) } - async getPkg(id: string, version = '*'): Promise { + async getPkg (id: string, version = '*'): Promise { const pkgs = await this.getMarketplacePkgs({ ids: [{ id, version }], }) @@ -108,19 +108,19 @@ export class MarketplaceService { } } - async cacheReleaseNotes(id: string): Promise { + async cacheReleaseNotes (id: string): Promise { this.releaseNotes[id] = await this.getReleaseNotes({ id }) } - async getMarketplaceData( + async getMarketplaceData ( params: RR.GetMarketplaceDataReq, url?: string, ): Promise { url = url || this.marketplaceUrl - return this.api.marketplaceProxy('/package/v0/data', params, url) + return this.api.marketplaceProxy('/package/v0/info', params, url) } - async getMarketplacePkgs( + async getMarketplacePkgs ( params: Omit, ): Promise { if (params.query) delete params.category @@ -139,12 +139,12 @@ export class MarketplaceService { ) } - async getReleaseNotes( + async getReleaseNotes ( params: RR.GetReleaseNotesReq, ): Promise { return this.api.marketplaceProxy( - '/package/v0/release-notes', - params, + `/package/v0/release-notes/${params.id}`, + {}, this.marketplaceUrl, ) } diff --git a/frontend/projects/ui/src/app/services/api/embassy-mock-api.service.ts b/frontend/projects/ui/src/app/services/api/embassy-mock-api.service.ts index 74256477e..eadc69eaf 100644 --- a/frontend/projects/ui/src/app/services/api/embassy-mock-api.service.ts +++ b/frontend/projects/ui/src/app/services/api/embassy-mock-api.service.ts @@ -191,7 +191,7 @@ export class MockApiService extends ApiService { async marketplaceProxy (path: string, params: {}, url: string): Promise { await pauseFor(2000) - if (path === '/package/v0/data') { + if (path === '/package/v0/info') { return { name: 'Dark9', categories: [