aboutsummaryrefslogtreecommitdiff
path: root/dropped/docker/crupest-api/CrupestApi/CrupestApi.Secrets/SecretsExtensions.cs
diff options
context:
space:
mode:
Diffstat (limited to 'dropped/docker/crupest-api/CrupestApi/CrupestApi.Secrets/SecretsExtensions.cs')
-rw-r--r--dropped/docker/crupest-api/CrupestApi/CrupestApi.Secrets/SecretsExtensions.cs19
1 files changed, 19 insertions, 0 deletions
diff --git a/dropped/docker/crupest-api/CrupestApi/CrupestApi.Secrets/SecretsExtensions.cs b/dropped/docker/crupest-api/CrupestApi/CrupestApi.Secrets/SecretsExtensions.cs
new file mode 100644
index 0000000..e09887b
--- /dev/null
+++ b/dropped/docker/crupest-api/CrupestApi/CrupestApi.Secrets/SecretsExtensions.cs
@@ -0,0 +1,19 @@
+using CrupestApi.Commons.Secrets;
+using CrupestApi.Commons.Crud;
+
+namespace CrupestApi.Secrets;
+
+public static class SecretsExtensions
+{
+ public static IServiceCollection AddSecrets(this IServiceCollection services)
+ {
+ services.AddCrud<SecretInfo, SecretService>();
+ return services;
+ }
+
+ public static WebApplication MapSecrets(this WebApplication webApplication, string path = "/api/secrets")
+ {
+ webApplication.MapCrud<SecretInfo>(path, SecretsConstants.SecretManagementKey);
+ return webApplication;
+ }
+}