mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-05-17 07:12:32 +00:00
* Initial support for leaderboards and some refactoring * Start of UI redesign * Finish slot and user redesign, added deletion of comments, reviews, scores, and photos * Remove leftover debug print * Fix bug in permission check * Simplify sidebar code and add hearted and queued levels * Fix navbar scrolling on mobile and refactor SlotCardPartial
24 lines
No EOL
699 B
C#
24 lines
No EOL
699 B
C#
#nullable enable
|
|
using LBPUnion.ProjectLighthouse.PlayerData;
|
|
using LBPUnion.ProjectLighthouse.Servers.Website.Pages.Layouts;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace LBPUnion.ProjectLighthouse.Servers.Website.Pages.Login;
|
|
|
|
public class LogoutPage : BaseLayout
|
|
{
|
|
public LogoutPage(Database database) : base(database)
|
|
{}
|
|
public async Task<IActionResult> OnGet()
|
|
{
|
|
WebToken? token = this.Database.WebTokenFromRequest(this.Request);
|
|
if (token == null) return this.BadRequest();
|
|
|
|
this.Database.WebTokens.Remove(token);
|
|
await this.Database.SaveChangesAsync();
|
|
|
|
this.Response.Cookies.Delete("LighthouseToken");
|
|
|
|
return this.Page();
|
|
}
|
|
} |