mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-25 23:18:44 -07:00
Add game configuration management: implement endpoints for retrieving and updating discovered game configurations; enhance database schema and UI integration
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user