1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

Update revision date upon cipher restore (#243)

* Update revision date upon cipher restore

* Receive and use returned datetimes from restore
This commit is contained in:
Matt Gibson
2021-01-08 08:53:41 -06:00
committed by GitHub
parent afa01f67f4
commit cea09a22e5
4 changed files with 30 additions and 21 deletions

View File

@@ -556,16 +556,19 @@ export class ApiService implements ApiServiceAbstraction {
return this.send('PUT', '/ciphers/delete-admin', request, true, false);
}
putRestoreCipher(id: string): Promise<any> {
return this.send('PUT', '/ciphers/' + id + '/restore', null, true, false);
async putRestoreCipher(id: string): Promise<CipherResponse> {
const r = await this.send('PUT', '/ciphers/' + id + '/restore', null, true, true);
return new CipherResponse(r);
}
putRestoreCipherAdmin(id: string): Promise<any> {
return this.send('PUT', '/ciphers/' + id + '/restore-admin', null, true, false);
async putRestoreCipherAdmin(id: string): Promise<CipherResponse> {
const r = await this.send('PUT', '/ciphers/' + id + '/restore-admin', null, true, true);
return new CipherResponse(r);
}
putRestoreManyCiphers(request: CipherBulkDeleteRequest): Promise<any> {
return this.send('PUT', '/ciphers/restore', request, true, false);
async putRestoreManyCiphers(request: CipherBulkDeleteRequest): Promise<ListResponse<CipherResponse>> {
const r = await this.send('PUT', '/ciphers/restore', request, true, true);
return new ListResponse<CipherResponse>(r, CipherResponse);
}
// Attachments APIs