mirror of
https://github.com/bitwarden/server
synced 2025-12-28 06:03:29 +00:00
organization search page
This commit is contained in:
@@ -45,6 +45,20 @@ namespace Bit.Core.Repositories.SqlServer
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<ICollection<Organization>> SearchAsync(string name, string userEmail, bool? paid,
|
||||
int skip, int take)
|
||||
{
|
||||
using(var connection = new SqlConnection(ConnectionString))
|
||||
{
|
||||
var results = await connection.QueryAsync<Organization>(
|
||||
"[dbo].[Organization_Search]",
|
||||
new { Name = name, UserEmail = userEmail, Paid = paid, Skip = skip, Take = take },
|
||||
commandType: CommandType.StoredProcedure);
|
||||
|
||||
return results.ToList();
|
||||
}
|
||||
}
|
||||
|
||||
public async Task UpdateStorageAsync(Guid id)
|
||||
{
|
||||
using(var connection = new SqlConnection(ConnectionString))
|
||||
|
||||
@@ -37,12 +37,12 @@ namespace Bit.Core.Repositories.SqlServer
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<ICollection<User>> SearchByEmailAsync(string email, int skip, int take)
|
||||
public async Task<ICollection<User>> SearchAsync(string email, int skip, int take)
|
||||
{
|
||||
using(var connection = new SqlConnection(ConnectionString))
|
||||
{
|
||||
var results = await connection.QueryAsync<User>(
|
||||
$"[{Schema}].[{Table}_SearchByEmail]",
|
||||
$"[{Schema}].[{Table}_Search]",
|
||||
new { Email = email, Skip = skip, Take = take },
|
||||
commandType: CommandType.StoredProcedure);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user