From 16a4c41886052b36edbccbf643a7e7352ea7cb9f Mon Sep 17 00:00:00 2001 From: Aaron Greenspan Date: Thu, 14 Jan 2021 17:28:53 -0700 Subject: [PATCH] ui: adds version to path of welcome OS --- ui/src/app/services/api/api.service.ts | 2 +- ui/src/app/services/api/live-api.service.ts | 4 ++-- ui/src/app/services/api/mock-api.service.ts | 2 +- ui/src/app/services/sync.notifier.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ui/src/app/services/api/api.service.ts b/ui/src/app/services/api/api.service.ts index 0629fd5f5..de41ccd3b 100644 --- a/ui/src/app/services/api/api.service.ts +++ b/ui/src/app/services/api/api.service.ts @@ -29,7 +29,7 @@ export abstract class ApiService { abstract getNotifications (page: number, perPage: number): Promise abstract deleteNotification (id: string): Promise abstract updateAgent (thing: any): Promise - abstract acknowledgeOSWelcome (): Promise + abstract acknowledgeOSWelcome (version: string): Promise abstract getAvailableApps (): Promise abstract getAvailableApp (appId: string): Promise abstract getAvailableAppVersionSpecificInfo (appId: string, versionSpec: string): Promise diff --git a/ui/src/app/services/api/live-api.service.ts b/ui/src/app/services/api/live-api.service.ts index e06e66911..2be7b7a7d 100644 --- a/ui/src/app/services/api/live-api.service.ts +++ b/ui/src/app/services/api/live-api.service.ts @@ -37,8 +37,8 @@ export class LiveApiService extends ApiService { return this.authRequest({ method: Method.GET, url: '/', readTimeout: timeout }) } - async acknowledgeOSWelcome (): Promise { - return this.authRequest({ method: Method.POST, url: '/welcome' }) + async acknowledgeOSWelcome (version: string): Promise { + return this.authRequest({ method: Method.POST, url: `/welcome/${version}` }) } async getVersionLatest (): Promise { diff --git a/ui/src/app/services/api/mock-api.service.ts b/ui/src/app/services/api/mock-api.service.ts index 550899841..9421828b8 100644 --- a/ui/src/app/services/api/mock-api.service.ts +++ b/ui/src/app/services/api/mock-api.service.ts @@ -117,7 +117,7 @@ export class MockApiService extends ApiService { return mockUninstallApp() } - async acknowledgeOSWelcome () { + async acknowledgeOSWelcome (version: string) { await pauseFor(2000) this.welcomeAck = true return { } diff --git a/ui/src/app/services/sync.notifier.ts b/ui/src/app/services/sync.notifier.ts index 2fd72b257..f2ad1246a 100644 --- a/ui/src/app/services/sync.notifier.ts +++ b/ui/src/app/services/sync.notifier.ts @@ -75,7 +75,7 @@ export class SyncNotifier { modal.onWillDismiss().then(() => { this.osWelcomeOpen = false - return this.apiService.acknowledgeOSWelcome() + return this.apiService.acknowledgeOSWelcome(this.config.version) }) await modal.present() }