mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-11 07:46:05 -07:00
When logging out as admin remove the username from the session
This commit is contained in:
parent
2f415cc1fd
commit
9aa60dfc23
1 changed files with 8 additions and 1 deletions
|
@ -61,7 +61,14 @@ namespace PlexRequests.UI.Modules
|
|||
return View["Index", model];
|
||||
};
|
||||
|
||||
Get["/logout"] = x => this.LogoutAndRedirect(!string.IsNullOrEmpty(BaseUrl) ? $"~/{BaseUrl}/" : "~/");
|
||||
Get["/logout"] = x =>
|
||||
{
|
||||
if (Session[SessionKeys.UsernameKey] != null)
|
||||
{
|
||||
Session.Delete(SessionKeys.UsernameKey);
|
||||
}
|
||||
return this.LogoutAndRedirect(!string.IsNullOrEmpty(BaseUrl) ? $"~/{BaseUrl}/" : "~/");
|
||||
};
|
||||
|
||||
Post["/login"] = x =>
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue