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

apis for purging user vault

This commit is contained in:
Kyle Spearrin
2017-10-25 21:26:09 -04:00
parent 3e04377e67
commit a042fd10f1
6 changed files with 84 additions and 0 deletions

View File

@ -353,6 +353,13 @@ namespace Bit.Api.Controllers
string.IsNullOrWhiteSpace(model.FolderId) ? (Guid?)null : new Guid(model.FolderId), userId);
}
[HttpPost("purge")]
public async Task PostPurge()
{
var userId = _userService.GetProperUserId(User).Value;
await _cipherRepository.DeleteByUserIdAsync(userId);
}
[HttpPost("{id}/attachment")]
[DisableFormValueModelBinding]
public async Task<CipherResponseModel> PostAttachment(string id)