mirror of
https://github.com/bitwarden/server.git
synced 2025-07-05 18:12:48 -05:00
Revert filescoped (#2227)
* Revert "Add git blame entry (#2226)" This reverts commit239286737d
. * Revert "Turn on file scoped namespaces (#2225)" This reverts commit34fb4cca2a
.
This commit is contained in:
@ -6,32 +6,33 @@ using Bit.Core.Repositories;
|
||||
using Bit.Core.Settings;
|
||||
using Dapper;
|
||||
|
||||
namespace Bit.Infrastructure.Dapper.Repositories;
|
||||
|
||||
public class OrganizationApiKeyRepository : Repository<OrganizationApiKey, Guid>, IOrganizationApiKeyRepository
|
||||
namespace Bit.Infrastructure.Dapper.Repositories
|
||||
{
|
||||
public OrganizationApiKeyRepository(GlobalSettings globalSettings)
|
||||
: this(globalSettings.SqlServer.ConnectionString, globalSettings.SqlServer.ReadOnlyConnectionString)
|
||||
public class OrganizationApiKeyRepository : Repository<OrganizationApiKey, Guid>, IOrganizationApiKeyRepository
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
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(GlobalSettings globalSettings)
|
||||
: this(globalSettings.SqlServer.ConnectionString, globalSettings.SqlServer.ReadOnlyConnectionString)
|
||||
{
|
||||
return await connection.QueryAsync<OrganizationApiKey>(
|
||||
"[dbo].[OrganizationApikey_ReadManyByOrganizationIdType]",
|
||||
new
|
||||
{
|
||||
OrganizationId = organizationId,
|
||||
Type = type,
|
||||
},
|
||||
commandType: CommandType.StoredProcedure);
|
||||
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user