get web vault url

This commit is contained in:
Kyle Spearrin 2018-06-25 08:06:19 -04:00
parent 1609ed5419
commit ca3b1c739c
2 changed files with 10 additions and 1 deletions

View File

@ -5,6 +5,7 @@ export abstract class EnvironmentService {
identityUrl: string;
iconsUrl: string;
getWebVaultUrl: () => string;
setUrlsFromStorage: () => Promise<void>;
setUrls: (urls: any) => Promise<any>;
}

View File

@ -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<void> {