mirror of
https://github.com/bitwarden/mobile.git
synced 2024-10-01 04:27:39 +02:00
Update revision date from server on restore (#1211)
This commit is contained in:
parent
3b5cae01e0
commit
ca7794e6f2
@ -40,7 +40,7 @@ namespace Bit.Core.Abstractions
|
|||||||
Task<FolderResponse> PutFolderAsync(string id, FolderRequest request);
|
Task<FolderResponse> PutFolderAsync(string id, FolderRequest request);
|
||||||
Task<CipherResponse> PutShareCipherAsync(string id, CipherShareRequest request);
|
Task<CipherResponse> PutShareCipherAsync(string id, CipherShareRequest request);
|
||||||
Task PutDeleteCipherAsync(string id);
|
Task PutDeleteCipherAsync(string id);
|
||||||
Task PutRestoreCipherAsync(string id);
|
Task<CipherResponse> PutRestoreCipherAsync(string id);
|
||||||
Task RefreshIdentityTokenAsync();
|
Task RefreshIdentityTokenAsync();
|
||||||
Task<object> PreValidateSso(string identifier);
|
Task<object> PreValidateSso(string identifier);
|
||||||
Task<TResponse> SendAsync<TRequest, TResponse>(HttpMethod method, string path,
|
Task<TResponse> SendAsync<TRequest, TResponse>(HttpMethod method, string path,
|
||||||
|
@ -262,9 +262,9 @@ namespace Bit.Core.Services
|
|||||||
return SendAsync<object, object>(HttpMethod.Put, string.Concat("/ciphers/", id, "/delete"), null, true, false);
|
return SendAsync<object, object>(HttpMethod.Put, string.Concat("/ciphers/", id, "/delete"), null, true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task PutRestoreCipherAsync(string id)
|
public Task<CipherResponse> PutRestoreCipherAsync(string id)
|
||||||
{
|
{
|
||||||
return SendAsync<object, object>(HttpMethod.Put, string.Concat("/ciphers/", id, "/restore"), null, true, false);
|
return SendAsync<object, CipherResponse>(HttpMethod.Put, string.Concat("/ciphers/", id, "/restore"), null, true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -760,8 +760,9 @@ namespace Bit.Core.Services
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await _apiService.PutRestoreCipherAsync(id);
|
var response = await _apiService.PutRestoreCipherAsync(id);
|
||||||
ciphers[id].DeletedDate = null;
|
ciphers[id].DeletedDate = null;
|
||||||
|
ciphers[id].RevisionDate = response.RevisionDate;
|
||||||
await _storageService.SaveAsync(cipherKey, ciphers);
|
await _storageService.SaveAsync(cipherKey, ciphers);
|
||||||
await ClearCacheAsync();
|
await ClearCacheAsync();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user