From 8b5c1516cad5713da8fa20ac38b5af5f69c57c41 Mon Sep 17 00:00:00 2001 From: Kim Date: Mon, 16 Oct 2023 13:47:27 +0200 Subject: [PATCH] Fixing stuff --- csharp/App/Backend/Controller.cs | 7 +++---- csharp/App/Backend/Properties/launchSettings.json | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/csharp/App/Backend/Controller.cs b/csharp/App/Backend/Controller.cs index 005221569..52e0e728d 100644 --- a/csharp/App/Backend/Controller.cs +++ b/csharp/App/Backend/Controller.cs @@ -467,8 +467,8 @@ public class Controller : ControllerBase return Unauthorized(); var session = new Session(user.HidePassword().HideParentIfUserHasNoAccessToParent(user)); - - return Db.Create(session) && Db.SendPasswordResetEmail(user, session.Token) + var res = Db.Create(session); + return res && Db.SendPasswordResetEmail(user, session.Token) ? Ok() : Unauthorized(); } @@ -487,8 +487,7 @@ public class Controller : ControllerBase { return Unauthorized(); } - - // Db.Sessions.Delete(s => s.Token == token); + // Console.WriteLine("HELP"); return Redirect($"https://monitor.innov.energy/?username={user.Email}"); } diff --git a/csharp/App/Backend/Properties/launchSettings.json b/csharp/App/Backend/Properties/launchSettings.json index 760aaabab..3bef649bb 100644 --- a/csharp/App/Backend/Properties/launchSettings.json +++ b/csharp/App/Backend/Properties/launchSettings.json @@ -7,7 +7,7 @@ "dotnetRunMessages": true, "launchUrl": "swagger", - "applicationUrl": "http://localhost:7087", + "applicationUrl": "https://localhost:7087", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development", "HOME":"~/backend"