mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-15 18:20:11 +00:00
fix: throw SystemNotFound in SystemGet instead of 404ing
This commit is contained in:
parent
3979cdd95a
commit
b273b49533
1 changed files with 1 additions and 1 deletions
|
|
@ -20,7 +20,7 @@ namespace PluralKit.API
|
||||||
public async Task<IActionResult> SystemGet(string systemRef)
|
public async Task<IActionResult> SystemGet(string systemRef)
|
||||||
{
|
{
|
||||||
var system = await ResolveSystem(systemRef);
|
var system = await ResolveSystem(systemRef);
|
||||||
if (system == null) return NotFound();
|
if (system == null) throw Errors.SystemNotFound;
|
||||||
else return Ok(system.ToJson(this.ContextFor(system), v: APIVersion.V2));
|
else return Ok(system.ToJson(this.ContextFor(system), v: APIVersion.V2));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue