mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-06 13:57:54 +00:00
web: add basic ASP.NET Core web interface
This commit is contained in:
parent
495edc3c5e
commit
95a7e5e821
13 changed files with 374 additions and 0 deletions
32
PluralKit.Web/Pages/ViewSystem.cshtml.cs
Normal file
32
PluralKit.Web/Pages/ViewSystem.cshtml.cs
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
|
||||
namespace PluralKit.Web.Pages
|
||||
{
|
||||
public class ViewSystem : PageModel
|
||||
{
|
||||
private SystemStore _systems;
|
||||
private MemberStore _members;
|
||||
|
||||
public ViewSystem(SystemStore systems, MemberStore members)
|
||||
{
|
||||
_systems = systems;
|
||||
_members = members;
|
||||
}
|
||||
|
||||
public PKSystem System { get; set; }
|
||||
public IEnumerable<PKMember> Members { get; set; }
|
||||
|
||||
public async Task<IActionResult> OnGet(string systemId)
|
||||
{
|
||||
System = await _systems.GetByHid(systemId);
|
||||
if (System == null) return NotFound();
|
||||
|
||||
Members = await _members.GetBySystem(System);
|
||||
|
||||
return Page();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue