mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 23:03:32 +00:00
[PM-10914] add option to delete all folders if migration fails (#10983)
* add option to delete all folders if migration fails * update text and flow to reattempt migration * clear encrypted folders as well on delete all * Update messaging
This commit is contained in:
@@ -5,4 +5,5 @@ export class FolderApiServiceAbstraction {
|
||||
save: (folder: Folder) => Promise<any>;
|
||||
delete: (id: string) => Promise<any>;
|
||||
get: (id: string) => Promise<FolderResponse>;
|
||||
deleteAll: () => Promise<void>;
|
||||
}
|
||||
|
||||
@@ -32,6 +32,11 @@ export class FolderApiService implements FolderApiServiceAbstraction {
|
||||
await this.folderService.delete(id);
|
||||
}
|
||||
|
||||
async deleteAll(): Promise<void> {
|
||||
await this.apiService.send("DELETE", "/folders/all", null, true, false);
|
||||
await this.folderService.clear();
|
||||
}
|
||||
|
||||
async get(id: string): Promise<FolderResponse> {
|
||||
const r = await this.apiService.send("GET", "/folders/" + id, null, true, true);
|
||||
return new FolderResponse(r);
|
||||
|
||||
Reference in New Issue
Block a user