Fixing stuff

This commit is contained in:
Kim 2023-10-16 13:47:27 +02:00
parent 19410edcbb
commit 8b5c1516ca
2 changed files with 4 additions and 5 deletions

View File

@ -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}");
}

View File

@ -7,7 +7,7 @@
"dotnetRunMessages": true,
"launchUrl": "swagger",
"applicationUrl": "http://localhost:7087",
"applicationUrl": "https://localhost:7087",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"HOME":"~/backend"