1
0
mirror of https://github.com/bitwarden/server synced 2025-12-25 04:33:26 +00:00

delete attachments

This commit is contained in:
Kyle Spearrin
2017-07-07 11:07:22 -04:00
parent d3c18381f9
commit 43262e577c
9 changed files with 155 additions and 18 deletions

View File

@@ -188,6 +188,17 @@ namespace Bit.Core.Repositories.SqlServer
}
}
public async Task DeleteAttachmentAsync(Guid cipherId, string attachmentId)
{
using(var connection = new SqlConnection(ConnectionString))
{
var results = await connection.ExecuteAsync(
$"[{Schema}].[Cipher_DeleteAttachment]",
new { Id = cipherId, AttachmentId = attachmentId },
commandType: CommandType.StoredProcedure);
}
}
public async Task DeleteAsync(IEnumerable<Guid> ids, Guid userId)
{
using(var connection = new SqlConnection(ConnectionString))