mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-29 16:38:37 +00:00
Implement property dependency injection for the website (#806)
* Remove most non DI usages of DbContext * Optimize website queries and refactor startup to use top level statements * Remove unused functions in UserEntity and SlotEntity * Optimize LBP1 LevelTags
This commit is contained in:
parent
727dd4e903
commit
e43397ac6a
47 changed files with 333 additions and 430 deletions
|
@ -8,14 +8,12 @@ using LBPUnion.ProjectLighthouse.Servers.Website.Pages.Layouts;
|
|||
using LBPUnion.ProjectLighthouse.Servers.Website.Types;
|
||||
using LBPUnion.ProjectLighthouse.Types.Entities.Profile;
|
||||
using LBPUnion.ProjectLighthouse.Types.Logging;
|
||||
using LBPUnion.ProjectLighthouse.Types.Maintenance;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace LBPUnion.ProjectLighthouse.Servers.Website.Pages.Admin;
|
||||
|
||||
public class AdminPanelPage : BaseLayout
|
||||
{
|
||||
public List<ICommand> Commands = MaintenanceHelper.Commands;
|
||||
public AdminPanelPage(DatabaseContext database) : base(database)
|
||||
{ }
|
||||
|
||||
|
@ -40,7 +38,7 @@ public class AdminPanelPage : BaseLayout
|
|||
args = command + " " + args;
|
||||
string[] split = args.Split(" ");
|
||||
|
||||
List<LogLine> runCommand = await MaintenanceHelper.RunCommand(split);
|
||||
List<LogLine> runCommand = await MaintenanceHelper.RunCommand(this.HttpContext.RequestServices, split);
|
||||
return this.Redirect($"~/admin?log={CryptoHelper.ToBase64(runCommand.ToLogString())}");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue