Fixing stuff
This commit is contained in:
parent
19410edcbb
commit
8b5c1516ca
|
@ -467,8 +467,8 @@ public class Controller : ControllerBase
|
||||||
return Unauthorized();
|
return Unauthorized();
|
||||||
|
|
||||||
var session = new Session(user.HidePassword().HideParentIfUserHasNoAccessToParent(user));
|
var session = new Session(user.HidePassword().HideParentIfUserHasNoAccessToParent(user));
|
||||||
|
var res = Db.Create(session);
|
||||||
return Db.Create(session) && Db.SendPasswordResetEmail(user, session.Token)
|
return res && Db.SendPasswordResetEmail(user, session.Token)
|
||||||
? Ok()
|
? Ok()
|
||||||
: Unauthorized();
|
: Unauthorized();
|
||||||
}
|
}
|
||||||
|
@ -487,8 +487,7 @@ public class Controller : ControllerBase
|
||||||
{
|
{
|
||||||
return Unauthorized();
|
return Unauthorized();
|
||||||
}
|
}
|
||||||
|
// Console.WriteLine("HELP");
|
||||||
// Db.Sessions.Delete(s => s.Token == token);
|
|
||||||
return Redirect($"https://monitor.innov.energy/?username={user.Email}");
|
return Redirect($"https://monitor.innov.energy/?username={user.Email}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
"dotnetRunMessages": true,
|
"dotnetRunMessages": true,
|
||||||
|
|
||||||
"launchUrl": "swagger",
|
"launchUrl": "swagger",
|
||||||
"applicationUrl": "http://localhost:7087",
|
"applicationUrl": "https://localhost:7087",
|
||||||
"environmentVariables": {
|
"environmentVariables": {
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development",
|
"ASPNETCORE_ENVIRONMENT": "Development",
|
||||||
"HOME":"~/backend"
|
"HOME":"~/backend"
|
||||||
|
|
Loading…
Reference in New Issue