Add game configuration management: implement endpoints for retrieving and updating discovered game configurations; enhance database schema and UI integration

This commit is contained in:
Alexa
2026-06-02 17:14:39 +03:00
parent 810ba0992c
commit ef440bedaa
6 changed files with 457 additions and 13 deletions
@@ -1531,6 +1531,19 @@ public class AdminController(
return Ok(doors);
}
[HttpGet("settings/gameconfigs")]
public async Task<ActionResult> GetDiscoveredGameConfigs()
=> Ok(await serverSettings.GetDiscoveredGameConfigsAsync());
[HttpPost("settings/gameconfigs")]
public async Task<ActionResult> SetDiscoveredGameConfigs([FromBody] DiscoveredGameConfigSettings body)
{
var settings = await serverSettings.SetDiscoveredGameConfigsAsync(body);
await LogAsync("gameconfigs_updated", "system", 0, "discovered");
await db.SaveChangesAsync();
return Ok(settings);
}
// ── Signup codes ─────────────────────────────────────────────────────
/// <summary>GET <c>api/admin/v1/signup-codes</c> — every issued code