mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-23 11:56:00 +01:00
sync service abstraction
This commit is contained in:
parent
78088acac7
commit
9cd74af2df
@ -1,9 +1,9 @@
|
||||
export interface SyncService {
|
||||
export abstract class SyncService {
|
||||
syncInProgress: boolean;
|
||||
|
||||
getLastSync(): Promise<Date>;
|
||||
setLastSync(date: Date): Promise<any>;
|
||||
syncStarted(): void;
|
||||
syncCompleted(successfully: boolean): void;
|
||||
fullSync(forceSync: boolean): Promise<boolean>;
|
||||
getLastSync: () => Promise<Date>;
|
||||
setLastSync: (date: Date) => Promise<any>;
|
||||
syncStarted: () => void;
|
||||
syncCompleted: (successfully: boolean) => void;
|
||||
fullSync: (forceSync: boolean) => Promise<boolean>;
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ import { FolderService } from '../abstractions/folder.service';
|
||||
import { MessagingService } from '../abstractions/messaging.service';
|
||||
import { SettingsService } from '../abstractions/settings.service';
|
||||
import { StorageService } from '../abstractions/storage.service';
|
||||
import { SyncService as SyncServiceInterface } from '../abstractions/sync.service';
|
||||
import { SyncService as SyncServiceAbstraction } from '../abstractions/sync.service';
|
||||
import { UserService } from '../abstractions/user.service';
|
||||
|
||||
import { CipherData } from '../models/data/cipherData';
|
||||
@ -23,7 +23,7 @@ const Keys = {
|
||||
lastSyncPrefix: 'lastSync_',
|
||||
};
|
||||
|
||||
export class SyncService implements SyncServiceInterface {
|
||||
export class SyncService implements SyncServiceAbstraction {
|
||||
syncInProgress: boolean = false;
|
||||
|
||||
constructor(private userService: UserService, private apiService: ApiService,
|
||||
|
Loading…
Reference in New Issue
Block a user