From ca3b1c739c6a7ef503845a1485cc76643276a259 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 25 Jun 2018 08:06:19 -0400 Subject: [PATCH] get web vault url --- src/abstractions/environment.service.ts | 1 + src/services/environment.service.ts | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/abstractions/environment.service.ts b/src/abstractions/environment.service.ts index 1f6bc390bc..8c27710f2c 100644 --- a/src/abstractions/environment.service.ts +++ b/src/abstractions/environment.service.ts @@ -5,6 +5,7 @@ export abstract class EnvironmentService { identityUrl: string; iconsUrl: string; + getWebVaultUrl: () => string; setUrlsFromStorage: () => Promise; setUrls: (urls: any) => Promise; } diff --git a/src/services/environment.service.ts b/src/services/environment.service.ts index e1544489f1..e41a27c54c 100644 --- a/src/services/environment.service.ts +++ b/src/services/environment.service.ts @@ -13,7 +13,15 @@ export class EnvironmentService implements EnvironmentServiceAbstraction { identityUrl: string; iconsUrl: string; - constructor(private apiService: ApiService, private storageService: StorageService) { + constructor(private apiService: ApiService, private storageService: StorageService) {} + + getWebVaultUrl(): string { + if (this.webVaultUrl != null) { + return this.webVaultUrl; + } else if (this.baseUrl) { + return this.baseUrl; + } + return null; } async setUrlsFromStorage(): Promise {