1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-27 12:36:14 +01:00

prod urls for web client

This commit is contained in:
Kyle Spearrin 2018-06-13 14:08:43 -04:00
parent c42a45e967
commit 4dea46f1ad

View File

@ -1,4 +1,4 @@
import { ConstantsService } from './constants.service'; import { DeviceType } from '../enums/deviceType';
import { ApiService as ApiServiceAbstraction } from '../abstractions/api.service'; import { ApiService as ApiServiceAbstraction } from '../abstractions/api.service';
import { PlatformUtilsService } from '../abstractions/platformUtils.service'; import { PlatformUtilsService } from '../abstractions/platformUtils.service';
@ -37,8 +37,9 @@ export class ApiService implements ApiServiceAbstraction {
constructor(private tokenService: TokenService, private platformUtilsService: PlatformUtilsService, constructor(private tokenService: TokenService, private platformUtilsService: PlatformUtilsService,
private logoutCallback: (expired: boolean) => Promise<void>) { private logoutCallback: (expired: boolean) => Promise<void>) {
this.deviceType = platformUtilsService.getDevice().toString(); const device = platformUtilsService.getDevice();
this.isWebClient = platformUtilsService.identityClientId === 'web'; this.deviceType = device.toString();
this.isWebClient = device === DeviceType.Web;
} }
setUrls(urls: EnvironmentUrls): void { setUrls(urls: EnvironmentUrls): void {
@ -75,8 +76,13 @@ export class ApiService implements ApiServiceAbstraction {
//this.identityBaseUrl = 'https://preview-identity.bitwarden.com'; //this.identityBaseUrl = 'https://preview-identity.bitwarden.com';
// Production // Production
this.baseUrl = 'https://api.bitwarden.com'; if (this.isWebClient) {
this.identityBaseUrl = 'https://identity.bitwarden.com'; 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 */ /* tslint:enable */
} }