1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-04 01:22:50 -05:00

added cipher history API for data syncing with client databases

This commit is contained in:
Kyle Spearrin
2016-06-08 20:40:20 -04:00
parent 6861303586
commit 89e524e1e4
6 changed files with 86 additions and 0 deletions

View File

@ -50,6 +50,14 @@ namespace Bit.Api.Controllers
return new ListResponseModel<CipherResponseModel>(responses);
}
[HttpGet("history")]
public async Task<CipherHistoryResponseModel> Get(DateTime since)
{
var history = await _cipherRepository.GetManySinceRevisionDateAndUserIdWithDeleteHistoryAsync(
since, new Guid(_userManager.GetUserId(User)));
return new CipherHistoryResponseModel(history.Item1, history.Item2);
}
[HttpPost("import")]
public async Task PostImport([FromBody]ImportRequestModel model)
{