diff options
| author | transtrike <transtrike@gmail.com> | 2021-02-15 19:06:14 +0200 |
|---|---|---|
| committer | transtrike <transtrike@gmail.com> | 2021-02-15 19:06:14 +0200 |
| commit | 4c03712af14c37718b7be5b23fcadeb86f2a2191 (patch) | |
| tree | 0c6b5a592244e5b2574afa9e4919d4a3111eea34 /src/Web/DevHive.Web/Configurations | |
| parent | 09fc4603e82f69c926f9457085aa3fa48bb3939c (diff) | |
| download | DevHive-4c03712af14c37718b7be5b23fcadeb86f2a2191.tar DevHive-4c03712af14c37718b7be5b23fcadeb86f2a2191.tar.gz DevHive-4c03712af14c37718b7be5b23fcadeb86f2a2191.zip | |
Code Analyzer added to all csproj; Removed unnessessary code; Fixed formatting
Diffstat (limited to 'src/Web/DevHive.Web/Configurations')
| -rw-r--r-- | src/Web/DevHive.Web/Configurations/Extensions/ConfigureAutoMapper.cs | 5 | ||||
| -rw-r--r-- | src/Web/DevHive.Web/Configurations/Extensions/ConfigureExceptionHandlerMiddleware.cs | 2 | ||||
| -rw-r--r-- | src/Web/DevHive.Web/Configurations/Extensions/ConfigureJwt.cs (renamed from src/Web/DevHive.Web/Configurations/Extensions/ConfigureJWT.cs) | 6 |
3 files changed, 5 insertions, 8 deletions
diff --git a/src/Web/DevHive.Web/Configurations/Extensions/ConfigureAutoMapper.cs b/src/Web/DevHive.Web/Configurations/Extensions/ConfigureAutoMapper.cs index 8b7d657..0b8194e 100644 --- a/src/Web/DevHive.Web/Configurations/Extensions/ConfigureAutoMapper.cs +++ b/src/Web/DevHive.Web/Configurations/Extensions/ConfigureAutoMapper.cs @@ -1,6 +1,5 @@ using System; using AutoMapper; -//using AutoMapper.Configuration; using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.DependencyInjection; @@ -15,10 +14,10 @@ namespace DevHive.Web.Configurations.Extensions public static void UseAutoMapperConfiguration(this IApplicationBuilder app) { - var config = new MapperConfiguration(cfg => + _ = new MapperConfiguration(cfg => { cfg.AllowNullCollections = true; }); } } -}
\ No newline at end of file +} diff --git a/src/Web/DevHive.Web/Configurations/Extensions/ConfigureExceptionHandlerMiddleware.cs b/src/Web/DevHive.Web/Configurations/Extensions/ConfigureExceptionHandlerMiddleware.cs index 286727f..c017a8c 100644 --- a/src/Web/DevHive.Web/Configurations/Extensions/ConfigureExceptionHandlerMiddleware.cs +++ b/src/Web/DevHive.Web/Configurations/Extensions/ConfigureExceptionHandlerMiddleware.cs @@ -6,8 +6,6 @@ namespace DevHive.Web.Configurations.Extensions { public static class ConfigureExceptionHandlerMiddleware { - public static void ExceptionHandlerMiddlewareConfiguration(this IServiceCollection services) { } - public static void UseExceptionHandlerMiddlewareConfiguration(this IApplicationBuilder app) { app.UseMiddleware<ExceptionMiddleware>(); diff --git a/src/Web/DevHive.Web/Configurations/Extensions/ConfigureJWT.cs b/src/Web/DevHive.Web/Configurations/Extensions/ConfigureJwt.cs index d422bc8..03d4b11 100644 --- a/src/Web/DevHive.Web/Configurations/Extensions/ConfigureJWT.cs +++ b/src/Web/DevHive.Web/Configurations/Extensions/ConfigureJwt.cs @@ -8,11 +8,11 @@ using Microsoft.IdentityModel.Tokens; namespace DevHive.Web.Configurations.Extensions { - public static class JWTExtensions + public static class ConfigureJwt { public static void JWTConfiguration(this IServiceCollection services, IConfiguration configuration) { - services.AddSingleton(new JWTOptions(configuration + services.AddSingleton(new JwtOptions(configuration .GetSection("AppSettings") .GetSection("Secret") .Value)); @@ -51,4 +51,4 @@ namespace DevHive.Web.Configurations.Extensions }); } } -}
\ No newline at end of file +} |
