Add an endpoint to view your own system

This commit is contained in:
Ske
2019-07-15 20:06:28 +02:00
parent cc31664f8b
commit 39152dbd27
2 changed files with 28 additions and 0 deletions

View File

@@ -48,6 +48,13 @@ namespace PluralKit.API.Controllers
_auth = auth;
}
[HttpGet]
[RequiresSystem]
public async Task<ActionResult<PKSystem>> GetOwnSystem()
{
return Ok(_auth.CurrentSystem);
}
[HttpGet("{hid}")]
public async Task<ActionResult<PKSystem>> GetSystem(string hid)
{