mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-24 12:06:15 +01:00
prod urls for web client
This commit is contained in:
parent
c42a45e967
commit
4dea46f1ad
@ -1,4 +1,4 @@
|
||||
import { ConstantsService } from './constants.service';
|
||||
import { DeviceType } from '../enums/deviceType';
|
||||
|
||||
import { ApiService as ApiServiceAbstraction } from '../abstractions/api.service';
|
||||
import { PlatformUtilsService } from '../abstractions/platformUtils.service';
|
||||
@ -37,8 +37,9 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
|
||||
constructor(private tokenService: TokenService, private platformUtilsService: PlatformUtilsService,
|
||||
private logoutCallback: (expired: boolean) => Promise<void>) {
|
||||
this.deviceType = platformUtilsService.getDevice().toString();
|
||||
this.isWebClient = platformUtilsService.identityClientId === 'web';
|
||||
const device = platformUtilsService.getDevice();
|
||||
this.deviceType = device.toString();
|
||||
this.isWebClient = device === DeviceType.Web;
|
||||
}
|
||||
|
||||
setUrls(urls: EnvironmentUrls): void {
|
||||
@ -75,8 +76,13 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
//this.identityBaseUrl = 'https://preview-identity.bitwarden.com';
|
||||
|
||||
// Production
|
||||
if (this.isWebClient) {
|
||||
this.baseUrl = 'https://vault.bitwarden.com/api';
|
||||
this.identityBaseUrl = 'https://vault.bitwarden.com/identity';
|
||||
} else {
|
||||
this.baseUrl = 'https://api.bitwarden.com';
|
||||
this.identityBaseUrl = 'https://identity.bitwarden.com';
|
||||
}
|
||||
/* tslint:enable */
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user