diff --git a/src/background.html b/src/background.html
index ecce90d7df..37a8daa853 100644
--- a/src/background.html
+++ b/src/background.html
@@ -4,7 +4,6 @@
-
diff --git a/src/background.js b/src/background.js
index 40c89dc4a3..52685dd5da 100644
--- a/src/background.js
+++ b/src/background.js
@@ -1,6 +1,7 @@
// Service imports
import ApiService from './services/api.service';
import AppIdService from './services/appId.service';
+import CipherService from './services/cipherService.js';
import ConstantsService from './services/constants.service';
import CryptoService from './services/crypto.service';
import EnvironmentService from './services/environment.service';
@@ -100,7 +101,7 @@ var bg_isBackground = true,
window.bg_settingsService = bg_settingsService = new SettingsService(bg_userService);
window.bg_cipherService = bg_cipherService = new CipherService(bg_cryptoService, bg_userService, bg_apiService, bg_settingsService, bg_utilsService,
bg_constantsService);
- window.bg_folderService = bg_folderService = new FolderService(bg_cryptoService, bg_userService, bg_apiService, bg_i18nService, bg_utilsService);
+ window.bg_folderService = bg_folderService = new FolderService(bg_cryptoService, bg_userService, bg_i18nService, bg_apiService);
window.bg_lockService = bg_lockService = new LockService(bg_constantsService, bg_cryptoService, bg_folderService, bg_cipherService, bg_utilsService,
setIcon, refreshBadgeAndMenu);
window.bg_syncService = bg_syncService = new SyncService(bg_cipherService, bg_folderService, bg_userService, bg_apiService, bg_settingsService,
diff --git a/src/models/domain/cipher.ts b/src/models/domain/cipher.ts
index de4d915ee3..a0155999f4 100644
--- a/src/models/domain/cipher.ts
+++ b/src/models/domain/cipher.ts
@@ -178,4 +178,4 @@ class Cipher extends Domain {
}
export { Cipher };
-(window as any).Attachment = Cipher;
+(window as any).Cipher = Cipher;
diff --git a/src/services/cipherService.js b/src/services/cipherService.js
index 4398420f7b..4c6f76f423 100644
--- a/src/services/cipherService.js
+++ b/src/services/cipherService.js
@@ -1,4 +1,11 @@
-function CipherService(cryptoService, userService, apiService, settingsService, utilsService, constantsService) {
+import { Cipher } from '../models/domain/cipher';
+
+import { CipherData } from '../models/data/cipherData';
+
+import { CipherRequest } from '../models/request/cipherRequest';
+import { CipherResponse } from '../models/response/cipherResponse';
+
+export default function CipherService(cryptoService, userService, apiService, settingsService, utilsService, constantsService) {
this.cryptoService = cryptoService;
this.userService = userService;
this.apiService = apiService;
diff --git a/src/services/folder.service.ts b/src/services/folder.service.ts
index e8502d1427..086b735836 100644
--- a/src/services/folder.service.ts
+++ b/src/services/folder.service.ts
@@ -29,27 +29,32 @@ export default class FolderService {
async encrypt(model: any): Promise {
const folder = new Folder();
+ folder.id = model.id;
folder.name = await this.cryptoService.encrypt(model.name);
return folder;
}
async get(id: string): Promise {
const userId = await this.userService.getUserId();
- const folders = await UtilsService.getObjFromStorage