1
0
mirror of https://github.com/bitwarden/server synced 2025-12-28 22:23:30 +00: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

@@ -235,6 +235,17 @@ namespace Bit.Core.Repositories.SqlServer
}
}
public async Task DeleteByUserIdAsync(Guid userId)
{
using(var connection = new SqlConnection(ConnectionString))
{
var results = await connection.ExecuteAsync(
$"[{Schema}].[Cipher_DeleteByUserId]",
new { UserId = userId },
commandType: CommandType.StoredProcedure);
}
}
public Task UpdateUserKeysAndCiphersAsync(User user, IEnumerable<Cipher> ciphers, IEnumerable<Folder> folders)
{
using(var connection = new SqlConnection(ConnectionString))