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

exclude domains from sync on web and desktop

This commit is contained in:
Kyle Spearrin 2018-06-25 22:47:01 -04:00
parent 79fd5d9832
commit 6ae6a79f43

View File

@ -41,6 +41,7 @@ export class ApiService implements ApiServiceAbstraction {
private deviceType: string;
private isWebClient = false;
private isDesktopClient = false;
private usingBaseUrl = false;
constructor(private tokenService: TokenService, private platformUtilsService: PlatformUtilsService,
@ -48,6 +49,8 @@ export class ApiService implements ApiServiceAbstraction {
const device = platformUtilsService.getDevice();
this.deviceType = device.toString();
this.isWebClient = device === DeviceType.Web;
this.isDesktopClient = device === DeviceType.Windows || device === DeviceType.MacOs ||
device === DeviceType.Linux;
}
setUrls(urls: EnvironmentUrls): void {
@ -254,7 +257,8 @@ export class ApiService implements ApiServiceAbstraction {
// Sync APIs
async getSync(): Promise<SyncResponse> {
const r = await this.send('GET', '/sync', null, true, true);
const path = this.isDesktopClient || this.isWebClient ? '/sync?excludeDomains=true' : '/sync';
const r = await this.send('GET', path, null, true, true);
return new SyncResponse(r);
}