From 2f975c41933731d81e570029fb59457399ec6d0d Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Thu, 21 Apr 2022 22:56:56 +0200 Subject: . --- src/server/Api/Internal/Account/GetClaimsRoute.cs | 2 ++ src/server/Api/Internal/BaseInternalRoute.cs | 2 +- src/server/Api/V1/BaseV1Route.cs | 2 +- src/server/IOL.BookmarkThing.Server.csproj | 16 ++++++++-------- src/server/Startup.cs | 2 +- src/server/StartupTasks.cs | 2 +- 6 files changed, 14 insertions(+), 12 deletions(-) (limited to 'src/server') diff --git a/src/server/Api/Internal/Account/GetClaimsRoute.cs b/src/server/Api/Internal/Account/GetClaimsRoute.cs index fde8887..b072a39 100644 --- a/src/server/Api/Internal/Account/GetClaimsRoute.cs +++ b/src/server/Api/Internal/Account/GetClaimsRoute.cs @@ -2,6 +2,8 @@ namespace IOL.BookmarkThing.Server.Api.Internal.Account; public class GetClaimsRoute : RouteBaseInternalSync.WithoutRequest.WithActionResult { + [ApiVersionNeutral] + [ApiExplorerSettings(IgnoreApi = true)] [HttpGet("~/v{apiVersion:apiVersion}/account/claims")] public override ActionResult Handle() { if (HttpContext.Request.Query.ContainsKey("download")) { diff --git a/src/server/Api/Internal/BaseInternalRoute.cs b/src/server/Api/Internal/BaseInternalRoute.cs index e416da7..665be09 100644 --- a/src/server/Api/Internal/BaseInternalRoute.cs +++ b/src/server/Api/Internal/BaseInternalRoute.cs @@ -9,7 +9,7 @@ public class BaseInternalRoute : ControllerBase /// User data for the currently logged on user. /// protected LoggedInInternalUser LoggedInUser => new() { - Id = User.FindFirstValue(AppClaims.USER_ID).ToGuid(), + Id = User.FindFirstValue(AppClaims.USER_ID).AsGuid(), Username = User.FindFirstValue(AppClaims.NAME), }; diff --git a/src/server/Api/V1/BaseV1Route.cs b/src/server/Api/V1/BaseV1Route.cs index bbccae6..29513ac 100644 --- a/src/server/Api/V1/BaseV1Route.cs +++ b/src/server/Api/V1/BaseV1Route.cs @@ -13,7 +13,7 @@ public class BaseV1Route : ControllerBase /// User data for the currently logged on user. /// protected LoggedInV1User LoggedInUser => new() { - Id = User.FindFirstValue(AppClaims.USER_ID).ToGuid(), + Id = User.FindFirstValue(AppClaims.USER_ID).AsGuid(), Username = User.FindFirstValue(AppClaims.NAME), }; diff --git a/src/server/IOL.BookmarkThing.Server.csproj b/src/server/IOL.BookmarkThing.Server.csproj index 70ee0fc..efe443b 100644 --- a/src/server/IOL.BookmarkThing.Server.csproj +++ b/src/server/IOL.BookmarkThing.Server.csproj @@ -17,20 +17,20 @@ - + - + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - + + + + + diff --git a/src/server/Startup.cs b/src/server/Startup.cs index 0d7c05f..f93b743 100644 --- a/src/server/Startup.cs +++ b/src/server/Startup.cs @@ -137,7 +137,7 @@ public class Startup app.UseCors(builder => { builder.AllowAnyMethod(); builder.AllowAnyHeader(); - builder.WithOrigins("http://localhost:3000"); + builder.WithOrigins("http://localhost:3001"); builder.AllowCredentials(); }); } diff --git a/src/server/StartupTasks.cs b/src/server/StartupTasks.cs index ba5ebcc..8eafd8f 100644 --- a/src/server/StartupTasks.cs +++ b/src/server/StartupTasks.cs @@ -23,7 +23,7 @@ public static class StartupTasks } Directory.CreateDirectory(path!); - Console.WriteLine("EnsuredCreated: " + path); + Console.WriteLine("Created new directory: " + path); } } } -- cgit v1.3