From 1305f10939a16ca71e53ea520885e291d2369889 Mon Sep 17 00:00:00 2001 From: kk Date: Wed, 19 Jun 2024 15:56:05 +0200 Subject: [PATCH 1/2] violate code style --- MangoAPI.Application/Services/AppSettingsService.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/MangoAPI.Application/Services/AppSettingsService.cs b/MangoAPI.Application/Services/AppSettingsService.cs index 164d266fa..11ee2ce62 100644 --- a/MangoAPI.Application/Services/AppSettingsService.cs +++ b/MangoAPI.Application/Services/AppSettingsService.cs @@ -6,6 +6,7 @@ namespace MangoAPI.Application.Services; public static class AppSettingsService { private const string AppSettingsPath = "../../../../MangoAPI.Presentation/appsettings.json"; + private const string _appSettingsPath = "../../../../MangoAPI.Presentation/appsettings.json"; public static string GetAppSettingsPath() { From 6126715077585bb8ecd524b574a8f75642b9fc01 Mon Sep 17 00:00:00 2001 From: kk Date: Wed, 19 Jun 2024 16:00:38 +0200 Subject: [PATCH 2/2] Build time errors fix --- MangoAPI.Application/Services/AppSettingsService.cs | 2 ++ MangoAPI.Application/Services/JwtGenerator.cs | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/MangoAPI.Application/Services/AppSettingsService.cs b/MangoAPI.Application/Services/AppSettingsService.cs index 11ee2ce62..91defe086 100644 --- a/MangoAPI.Application/Services/AppSettingsService.cs +++ b/MangoAPI.Application/Services/AppSettingsService.cs @@ -10,6 +10,8 @@ public static class AppSettingsService public static string GetAppSettingsPath() { + var a = _appSettingsPath; + Console.Write(a); var path = Path.Combine(AppContext.BaseDirectory, AppSettingsPath); return path; } diff --git a/MangoAPI.Application/Services/JwtGenerator.cs b/MangoAPI.Application/Services/JwtGenerator.cs index 837ad7f71..adb44875f 100644 --- a/MangoAPI.Application/Services/JwtGenerator.cs +++ b/MangoAPI.Application/Services/JwtGenerator.cs @@ -31,8 +31,8 @@ private string GenerateJwtToken(UserEntity userEntity, int lifetimeMinutes) { var claims = new List { - new Claim(JwtRegisteredClaimNames.Jti, userEntity.Id.ToString()), - new Claim(JwtRegisteredClaimNames.Name, userEntity.Username), + new(JwtRegisteredClaimNames.Jti, userEntity.Id.ToString()), + new(JwtRegisteredClaimNames.Name, userEntity.Username), }; var credentials = new SigningCredentials(key, SecurityAlgorithms.HmacSha256);