mirror of
https://github.com/bitwarden/server
synced 2026-01-07 19:13:50 +00:00
[PM-17562] Add GET endpoints for event integrations (#6104)
* [PM-17562] Add GET endpoints for event integrations * Default to null for Service * Respond to PR Feedback
This commit is contained in:
@@ -52,4 +52,20 @@ public class OrganizationIntegrationConfigurationRepository : Repository<Organiz
|
||||
return results.ToList();
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<List<OrganizationIntegrationConfiguration>> GetManyByIntegrationAsync(Guid organizationIntegrationId)
|
||||
{
|
||||
using (var connection = new SqlConnection(ConnectionString))
|
||||
{
|
||||
var results = await connection.QueryAsync<OrganizationIntegrationConfiguration>(
|
||||
"[dbo].[OrganizationIntegrationConfiguration_ReadManyByOrganizationIntegrationId]",
|
||||
new
|
||||
{
|
||||
OrganizationIntegrationId = organizationIntegrationId
|
||||
},
|
||||
commandType: CommandType.StoredProcedure);
|
||||
|
||||
return results.ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
using Bit.Core.AdminConsole.Entities;
|
||||
using System.Data;
|
||||
using Bit.Core.AdminConsole.Entities;
|
||||
using Bit.Core.Repositories;
|
||||
using Bit.Core.Settings;
|
||||
using Dapper;
|
||||
using Microsoft.Data.SqlClient;
|
||||
|
||||
namespace Bit.Infrastructure.Dapper.Repositories;
|
||||
|
||||
@@ -13,4 +16,17 @@ public class OrganizationIntegrationRepository : Repository<OrganizationIntegrat
|
||||
public OrganizationIntegrationRepository(string connectionString, string readOnlyConnectionString)
|
||||
: base(connectionString, readOnlyConnectionString)
|
||||
{ }
|
||||
|
||||
public async Task<List<OrganizationIntegration>> GetManyByOrganizationAsync(Guid organizationId)
|
||||
{
|
||||
using (var connection = new SqlConnection(ConnectionString))
|
||||
{
|
||||
var results = await connection.QueryAsync<OrganizationIntegration>(
|
||||
"[dbo].[OrganizationIntegration_ReadManyByOrganizationId]",
|
||||
new { OrganizationId = organizationId },
|
||||
commandType: CommandType.StoredProcedure);
|
||||
|
||||
return results.ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user