Avoid duplicate fullSync api calls (#716)
This commit is contained in:
parent
f7375e9064
commit
3f20122e5b
|
@ -13,6 +13,7 @@ import { SendService } from "../abstractions/send.service";
|
|||
import { SettingsService } from "../abstractions/settings.service";
|
||||
import { StateService } from "../abstractions/state.service";
|
||||
import { SyncService as SyncServiceAbstraction } from "../abstractions/sync.service";
|
||||
import { sequentialize } from "../misc/sequentialize";
|
||||
import { CipherData } from "../models/data/cipherData";
|
||||
import { CollectionData } from "../models/data/collectionData";
|
||||
import { FolderData } from "../models/data/folderData";
|
||||
|
@ -71,6 +72,7 @@ export class SyncService implements SyncServiceAbstraction {
|
|||
await this.stateService.setLastSync(date.toJSON(), { userId: userId });
|
||||
}
|
||||
|
||||
@sequentialize(() => "fullSync")
|
||||
async fullSync(forceSync: boolean, allowThrowOnError = false): Promise<boolean> {
|
||||
this.syncStarted();
|
||||
const isAuthenticated = await this.stateService.getIsAuthenticated();
|
||||
|
|
Loading…
Reference in New Issue