mirror of
https://github.com/bitwarden/server.git
synced 2025-07-05 18:12:48 -05:00
Run formatting (#2230)
This commit is contained in:
@ -6,33 +6,32 @@ using Bit.Core.Repositories;
|
||||
using Bit.Core.Settings;
|
||||
using Dapper;
|
||||
|
||||
namespace Bit.Infrastructure.Dapper.Repositories
|
||||
namespace Bit.Infrastructure.Dapper.Repositories;
|
||||
|
||||
public class OrganizationApiKeyRepository : Repository<OrganizationApiKey, Guid>, IOrganizationApiKeyRepository
|
||||
{
|
||||
public class OrganizationApiKeyRepository : Repository<OrganizationApiKey, Guid>, IOrganizationApiKeyRepository
|
||||
public OrganizationApiKeyRepository(GlobalSettings globalSettings)
|
||||
: this(globalSettings.SqlServer.ConnectionString, globalSettings.SqlServer.ReadOnlyConnectionString)
|
||||
{
|
||||
public OrganizationApiKeyRepository(GlobalSettings globalSettings)
|
||||
: this(globalSettings.SqlServer.ConnectionString, globalSettings.SqlServer.ReadOnlyConnectionString)
|
||||
|
||||
}
|
||||
|
||||
public OrganizationApiKeyRepository(string connectionString, string readOnlyConnectionString)
|
||||
: base(connectionString, readOnlyConnectionString)
|
||||
{ }
|
||||
|
||||
public async Task<IEnumerable<OrganizationApiKey>> GetManyByOrganizationIdTypeAsync(Guid organizationId, OrganizationApiKeyType? type = null)
|
||||
{
|
||||
using (var connection = new SqlConnection(ConnectionString))
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public OrganizationApiKeyRepository(string connectionString, string readOnlyConnectionString)
|
||||
: base(connectionString, readOnlyConnectionString)
|
||||
{ }
|
||||
|
||||
public async Task<IEnumerable<OrganizationApiKey>> GetManyByOrganizationIdTypeAsync(Guid organizationId, OrganizationApiKeyType? type = null)
|
||||
{
|
||||
using (var connection = new SqlConnection(ConnectionString))
|
||||
{
|
||||
return await connection.QueryAsync<OrganizationApiKey>(
|
||||
"[dbo].[OrganizationApikey_ReadManyByOrganizationIdType]",
|
||||
new
|
||||
{
|
||||
OrganizationId = organizationId,
|
||||
Type = type,
|
||||
},
|
||||
commandType: CommandType.StoredProcedure);
|
||||
}
|
||||
return await connection.QueryAsync<OrganizationApiKey>(
|
||||
"[dbo].[OrganizationApikey_ReadManyByOrganizationIdType]",
|
||||
new
|
||||
{
|
||||
OrganizationId = organizationId,
|
||||
Type = type,
|
||||
},
|
||||
commandType: CommandType.StoredProcedure);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user