mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-05-05 02:12:26 +00:00
25 lines
No EOL
590 B
C#
25 lines
No EOL
590 B
C#
#nullable enable
|
|
|
|
using LBPUnion.ProjectLighthouse.Website.Pages.Layouts;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
#if !DEBUG
|
|
using LBPUnion.ProjectLighthouse.Types;
|
|
#endif
|
|
|
|
namespace LBPUnion.ProjectLighthouse.Website.Pages.Debug;
|
|
|
|
public class RoomVisualizerPage : BaseLayout
|
|
{
|
|
public RoomVisualizerPage(Database database) : base(database)
|
|
{}
|
|
|
|
public IActionResult OnGet()
|
|
{
|
|
#if !DEBUG
|
|
User? user = this.Database.UserFromWebRequest(this.Request);
|
|
if (user == null || !user.IsAdmin) return this.NotFound();
|
|
#endif
|
|
|
|
return this.Page();
|
|
}
|
|
} |