mirror of
https://github.com/bitwarden/browser
synced 2025-12-31 23:53:37 +00:00
convert services to abstractions
This commit is contained in:
@@ -13,7 +13,7 @@ import { UserService } from '../abstractions/user.service';
|
||||
|
||||
export class AuthService {
|
||||
constructor(public cryptoService: CryptoService, public apiService: ApiService, public userService: UserService,
|
||||
public tokenService: TokenService, public $rootScope: any, public appIdService: AppIdService,
|
||||
public tokenService: TokenService, public appIdService: AppIdService,
|
||||
public platformUtilsService: PlatformUtilsService, public constantsService: ConstantsService,
|
||||
public messagingService: MessagingService) {
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ import { ErrorResponse } from '../models/response/errorResponse';
|
||||
import { ConstantsService } from './constants.service';
|
||||
|
||||
import { ApiService } from '../abstractions/api.service';
|
||||
import { CipherService as CipherServiceInterface } from '../abstractions/cipher.service';
|
||||
import { CipherService as CipherServiceAbstraction } from '../abstractions/cipher.service';
|
||||
import { CryptoService } from '../abstractions/crypto.service';
|
||||
import { SettingsService } from '../abstractions/settings.service';
|
||||
import { StorageService } from '../abstractions/storage.service';
|
||||
@@ -27,7 +27,7 @@ const Keys = {
|
||||
neverDomains: 'neverDomains',
|
||||
};
|
||||
|
||||
export class CipherService implements CipherServiceInterface {
|
||||
export class CipherService implements CipherServiceAbstraction {
|
||||
static sortCiphersByLastUsed(a: any, b: any): number {
|
||||
const aLastUsed = a.localData && a.localData.lastUsedDate ? a.localData.lastUsedDate as number : null;
|
||||
const bLastUsed = b.localData && b.localData.lastUsedDate ? b.localData.lastUsedDate as number : null;
|
||||
|
||||
@@ -2,7 +2,7 @@ import { CollectionData } from '../models/data/collectionData';
|
||||
|
||||
import { Collection } from '../models/domain/collection';
|
||||
|
||||
import { CollectionService as CollectionServiceInterface } from '../abstractions/collection.service';
|
||||
import { CollectionService as CollectionServiceAbstraction } from '../abstractions/collection.service';
|
||||
import { CryptoService } from '../abstractions/crypto.service';
|
||||
import { StorageService } from '../abstractions/storage.service';
|
||||
import { UserService } from '../abstractions/user.service';
|
||||
@@ -11,7 +11,7 @@ const Keys = {
|
||||
collectionsPrefix: 'collections_',
|
||||
};
|
||||
|
||||
export class CollectionService implements CollectionServiceInterface {
|
||||
export class CollectionService implements CollectionServiceAbstraction {
|
||||
decryptedCollectionCache: any[];
|
||||
|
||||
constructor(private cryptoService: CryptoService, private userService: UserService,
|
||||
|
||||
@@ -3,10 +3,10 @@ import { EnvironmentUrls } from '../models/domain/environmentUrls';
|
||||
import { ConstantsService } from './constants.service';
|
||||
|
||||
import { ApiService } from '../abstractions/api.service';
|
||||
import { EnvironmentService as EnvironmentServiceInterface } from '../abstractions/environment.service';
|
||||
import { EnvironmentService as EnvironmentServiceAbstraction } from '../abstractions/environment.service';
|
||||
import { StorageService } from '../abstractions/storage.service';
|
||||
|
||||
export class EnvironmentService implements EnvironmentServiceInterface {
|
||||
export class EnvironmentService implements EnvironmentServiceAbstraction {
|
||||
baseUrl: string;
|
||||
webVaultUrl: string;
|
||||
apiUrl: string;
|
||||
|
||||
@@ -8,7 +8,7 @@ import { FolderResponse } from '../models/response/folderResponse';
|
||||
|
||||
import { ApiService } from '../abstractions/api.service';
|
||||
import { CryptoService } from '../abstractions/crypto.service';
|
||||
import { FolderService as FolderServiceInterface } from '../abstractions/folder.service';
|
||||
import { FolderService as FolderServiceAbstraction } from '../abstractions/folder.service';
|
||||
import { StorageService } from '../abstractions/storage.service';
|
||||
import { UserService } from '../abstractions/user.service';
|
||||
|
||||
@@ -16,7 +16,7 @@ const Keys = {
|
||||
foldersPrefix: 'folders_',
|
||||
};
|
||||
|
||||
export class FolderService implements FolderServiceInterface {
|
||||
export class FolderService implements FolderServiceAbstraction {
|
||||
decryptedFolderCache: any[];
|
||||
|
||||
constructor(private cryptoService: CryptoService, private userService: UserService,
|
||||
|
||||
Reference in New Issue
Block a user