mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-26 07:28:45 -07:00
18 lines
644 B
C#
18 lines
644 B
C#
using Microsoft.AspNetCore.Mvc;
|
|
using DorkNet.Server.Services;
|
|
|
|
namespace DorkNet.Server.Controllers.API.GameConfigurations;
|
|
|
|
[ApiController]
|
|
public class GameConfigurationsController(ServerSettingsService serverSettings) : ControllerBase
|
|
{
|
|
// Actual path used by the 2020 build
|
|
[HttpGet("api/gameconfigs/v1/all")]
|
|
[HttpGet("api/gameconfigs/v1")]
|
|
// Legacy path we originally assumed
|
|
[HttpGet("api/gameconfigurations/v1/all")]
|
|
[HttpGet("api/gameconfigurations/v1")]
|
|
public async Task<ActionResult<IReadOnlyList<GameConfigurationSetting>>> GetAll()
|
|
=> Ok(await serverSettings.GetGameConfigurationsAsync());
|
|
}
|