1
0
mirror of https://github.com/bitwarden/server synced 2025-12-26 13:13:24 +00:00

cipher details with subvaults api

This commit is contained in:
Kyle Spearrin
2017-04-04 17:22:47 -04:00
parent 854c4f7871
commit 7d9a2cdd95
6 changed files with 71 additions and 3 deletions

View File

@@ -31,5 +31,18 @@ namespace Bit.Core.Repositories.SqlServer
return results.ToList();
}
}
public async Task<ICollection<SubvaultCipher>> GetManyByUserIdCipherIdAsync(Guid userId, Guid cipherId)
{
using(var connection = new SqlConnection(ConnectionString))
{
var results = await connection.QueryAsync<SubvaultCipher>(
$"[dbo].[SubvaultCipher_ReadByUserIdCipherId]",
new { UserId = userId, CipherId = cipherId },
commandType: CommandType.StoredProcedure);
return results.ToList();
}
}
}
}