mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
feat(apiv2): group stubs, authentication middleware, /systems/:id endpoint
This commit is contained in:
parent
8a88b23021
commit
57722e035b
6 changed files with 227 additions and 6 deletions
|
|
@ -16,13 +16,12 @@ namespace PluralKit.API
|
|||
{
|
||||
public SystemControllerV2(IServiceProvider svc) : base(svc) { }
|
||||
|
||||
[HttpGet("{system}")]
|
||||
public async Task<IActionResult> SystemGet(string system)
|
||||
[HttpGet("{systemRef}")]
|
||||
public async Task<IActionResult> SystemGet(string systemRef)
|
||||
{
|
||||
return new ObjectResult("Unimplemented")
|
||||
{
|
||||
StatusCode = 501
|
||||
};
|
||||
var system = await ResolveSystem(systemRef);
|
||||
if (system == null) return NotFound();
|
||||
else return Ok(system.ToJson(LookupContextFor(system)));
|
||||
}
|
||||
|
||||
[HttpPatch("{system}")]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue