mirror of
https://github.com/bitwarden/server.git
synced 2025-07-05 10:02:47 -05:00
[SG-841] Refactor GetOrganizationApiKeyCommand (#2436)
* Renamed and split up class to only query for an organization key * Added a command class to create an organization api key * Updated service registration and controller to include new changes * Updated test cases to reflect refactor * fixed lint issues * Fixed PR comment
This commit is contained in:
@ -24,7 +24,7 @@ public static class OrganizationServiceCollectionExtensions
|
||||
services.AddTokenizers();
|
||||
services.AddOrganizationConnectionCommands();
|
||||
services.AddOrganizationSponsorshipCommands(globalSettings);
|
||||
services.AddOrganizationApiKeyCommands();
|
||||
services.AddOrganizationApiKeyCommandsQueries();
|
||||
}
|
||||
|
||||
private static void AddOrganizationConnectionCommands(this IServiceCollection services)
|
||||
@ -59,10 +59,11 @@ public static class OrganizationServiceCollectionExtensions
|
||||
}
|
||||
}
|
||||
|
||||
private static void AddOrganizationApiKeyCommands(this IServiceCollection services)
|
||||
private static void AddOrganizationApiKeyCommandsQueries(this IServiceCollection services)
|
||||
{
|
||||
services.AddScoped<IGetOrganizationApiKeyCommand, GetOrganizationApiKeyCommand>();
|
||||
services.AddScoped<IGetOrganizationApiKeyQuery, GetOrganizationApiKeyQuery>();
|
||||
services.AddScoped<IRotateOrganizationApiKeyCommand, RotateOrganizationApiKeyCommand>();
|
||||
services.AddScoped<ICreateOrganizationApiKeyCommand, CreateOrganizationApiKeyCommand>();
|
||||
}
|
||||
|
||||
private static void AddTokenizers(this IServiceCollection services)
|
||||
|
Reference in New Issue
Block a user