1
0
mirror of https://github.com/bitwarden/server synced 2026-01-02 16:43:25 +00:00

post, upload, and save cipher attachment

This commit is contained in:
Kyle Spearrin
2017-06-30 11:15:58 -04:00
parent 71f755dd44
commit 6cea556ae1
18 changed files with 158 additions and 25 deletions

View File

@@ -9,6 +9,7 @@ using Dapper;
using Core.Models.Data;
using Bit.Core.Utilities;
using Newtonsoft.Json;
using Bit.Core.Models.Data;
namespace Bit.Core.Repositories.SqlServer
{
@@ -176,6 +177,17 @@ namespace Bit.Core.Repositories.SqlServer
}
}
public async Task UpdateAttachmentAsync(CipherAttachment attachment)
{
using(var connection = new SqlConnection(ConnectionString))
{
var results = await connection.ExecuteAsync(
$"[{Schema}].[Cipher_UpdateAttachment]",
attachment,
commandType: CommandType.StoredProcedure);
}
}
public async Task DeleteAsync(IEnumerable<Guid> ids, Guid userId)
{
using(var connection = new SqlConnection(ConnectionString))