1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-27 13:43:41 +00:00

send removePasswordWithServer and model updates (#242)

This commit is contained in:
Kyle Spearrin
2020-12-30 16:23:52 -05:00
committed by GitHub
parent 1420082348
commit afa01f67f4
3 changed files with 26 additions and 1 deletions

View File

@@ -152,7 +152,6 @@ export class SendService implements SendServiceAbstraction {
const userId = await this.userService.getUserId();
const data = new SendData(response, userId);
await this.upsert(data);
}
async upsert(send: SendData | SendData[]): Promise<any> {
@@ -215,6 +214,13 @@ export class SendService implements SendServiceAbstraction {
await this.delete(id);
}
async removePasswordWithServer(id: string): Promise<any> {
const response = await this.apiService.putSendRemovePassword(id);
const userId = await this.userService.getUserId();
const data = new SendData(response, userId);
await this.upsert(data);
}
private parseFile(send: Send, file: File, key: SymmetricCryptoKey): Promise<ArrayBuffer> {
return new Promise((resolve, reject) => {
const reader = new FileReader();