exclude domains from sync on web and desktop
This commit is contained in:
parent
79fd5d9832
commit
6ae6a79f43
|
@ -41,6 +41,7 @@ export class ApiService implements ApiServiceAbstraction {
|
||||||
|
|
||||||
private deviceType: string;
|
private deviceType: string;
|
||||||
private isWebClient = false;
|
private isWebClient = false;
|
||||||
|
private isDesktopClient = false;
|
||||||
private usingBaseUrl = false;
|
private usingBaseUrl = false;
|
||||||
|
|
||||||
constructor(private tokenService: TokenService, private platformUtilsService: PlatformUtilsService,
|
constructor(private tokenService: TokenService, private platformUtilsService: PlatformUtilsService,
|
||||||
|
@ -48,6 +49,8 @@ export class ApiService implements ApiServiceAbstraction {
|
||||||
const device = platformUtilsService.getDevice();
|
const device = platformUtilsService.getDevice();
|
||||||
this.deviceType = device.toString();
|
this.deviceType = device.toString();
|
||||||
this.isWebClient = device === DeviceType.Web;
|
this.isWebClient = device === DeviceType.Web;
|
||||||
|
this.isDesktopClient = device === DeviceType.Windows || device === DeviceType.MacOs ||
|
||||||
|
device === DeviceType.Linux;
|
||||||
}
|
}
|
||||||
|
|
||||||
setUrls(urls: EnvironmentUrls): void {
|
setUrls(urls: EnvironmentUrls): void {
|
||||||
|
@ -254,7 +257,8 @@ export class ApiService implements ApiServiceAbstraction {
|
||||||
// Sync APIs
|
// Sync APIs
|
||||||
|
|
||||||
async getSync(): Promise<SyncResponse> {
|
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);
|
return new SyncResponse(r);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue