mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
Fix API system fronter endpoint crashing on system with no switches
This commit is contained in:
parent
740ccf6979
commit
641532daec
1 changed files with 2 additions and 0 deletions
|
|
@ -92,6 +92,8 @@ namespace PluralKit.API.Controllers
|
|||
if (system == null) return NotFound("System not found.");
|
||||
|
||||
var sw = await _switches.GetLatestSwitch(system);
|
||||
if (sw == null) return NotFound("System has no registered switches.");
|
||||
|
||||
var members = await _switches.GetSwitchMembers(sw);
|
||||
return Ok(new FrontersReturn
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue