1
0
mirror of https://github.com/bitwarden/server synced 2025-12-25 12:43:14 +00:00

read collection that are write only

This commit is contained in:
Kyle Spearrin
2017-08-30 15:57:17 -04:00
parent ff22e00ec5
commit 5bda2ef32f
6 changed files with 60 additions and 8 deletions

View File

@@ -64,13 +64,13 @@ namespace Bit.Core.Repositories.SqlServer
}
}
public async Task<ICollection<Collection>> GetManyByUserIdAsync(Guid userId)
public async Task<ICollection<Collection>> GetManyByUserIdAsync(Guid userId, bool writeOnly)
{
using(var connection = new SqlConnection(ConnectionString))
{
var results = await connection.QueryAsync<Collection>(
$"[{Schema}].[Collection_ReadByUserId]",
new { UserId = userId },
new { UserId = userId, WriteOnly = writeOnly },
commandType: CommandType.StoredProcedure);
// Return distinct Id results.