diff options
author | crupest <crupest@outlook.com> | 2022-12-19 12:24:54 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-12-20 20:32:53 +0800 |
commit | e9b958cc41a3b941d878fd455e297a50e050be1a (patch) | |
tree | 1e431c0b2038cde586be12cfb96c6c2da75b11e8 /docker/crupest-api/CrupestApi/CrupestApi.Secrets/SecretsExtensions.cs | |
parent | f73342cb6b0592d3a6310f9a12fd40b4bf218e5c (diff) | |
download | crupest-e9b958cc41a3b941d878fd455e297a50e050be1a.tar.gz crupest-e9b958cc41a3b941d878fd455e297a50e050be1a.tar.bz2 crupest-e9b958cc41a3b941d878fd455e297a50e050be1a.zip |
Develop secret api. v43
Diffstat (limited to 'docker/crupest-api/CrupestApi/CrupestApi.Secrets/SecretsExtensions.cs')
-rw-r--r-- | docker/crupest-api/CrupestApi/CrupestApi.Secrets/SecretsExtensions.cs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/docker/crupest-api/CrupestApi/CrupestApi.Secrets/SecretsExtensions.cs b/docker/crupest-api/CrupestApi/CrupestApi.Secrets/SecretsExtensions.cs new file mode 100644 index 0000000..e09887b --- /dev/null +++ b/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; + } +} |