diff --git a/src/Core/Abstractions/IApiService.cs b/src/Core/Abstractions/IApiService.cs index e03d06c21..be692c8d4 100644 --- a/src/Core/Abstractions/IApiService.cs +++ b/src/Core/Abstractions/IApiService.cs @@ -40,7 +40,7 @@ namespace Bit.Core.Abstractions Task PutFolderAsync(string id, FolderRequest request); Task PutShareCipherAsync(string id, CipherShareRequest request); Task PutDeleteCipherAsync(string id); - Task PutRestoreCipherAsync(string id); + Task PutRestoreCipherAsync(string id); Task RefreshIdentityTokenAsync(); Task PreValidateSso(string identifier); Task SendAsync(HttpMethod method, string path, diff --git a/src/Core/Services/ApiService.cs b/src/Core/Services/ApiService.cs index d139f8991..6fac879c1 100644 --- a/src/Core/Services/ApiService.cs +++ b/src/Core/Services/ApiService.cs @@ -262,9 +262,9 @@ namespace Bit.Core.Services return SendAsync(HttpMethod.Put, string.Concat("/ciphers/", id, "/delete"), null, true, false); } - public Task PutRestoreCipherAsync(string id) + public Task PutRestoreCipherAsync(string id) { - return SendAsync(HttpMethod.Put, string.Concat("/ciphers/", id, "/restore"), null, true, false); + return SendAsync(HttpMethod.Put, string.Concat("/ciphers/", id, "/restore"), null, true, true); } #endregion diff --git a/src/Core/Services/CipherService.cs b/src/Core/Services/CipherService.cs index 423c6169c..48b1f23b2 100644 --- a/src/Core/Services/CipherService.cs +++ b/src/Core/Services/CipherService.cs @@ -760,8 +760,9 @@ namespace Bit.Core.Services { return; } - await _apiService.PutRestoreCipherAsync(id); + var response = await _apiService.PutRestoreCipherAsync(id); ciphers[id].DeletedDate = null; + ciphers[id].RevisionDate = response.RevisionDate; await _storageService.SaveAsync(cipherKey, ciphers); await ClearCacheAsync(); }