1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-07-03 18:39:39 -05:00

Add OpenAPI & Scalar UI

This commit is contained in:
Ayymoss
2024-10-15 22:05:19 +01:00
parent 2d7819c731
commit e736c28c38
6 changed files with 34 additions and 11 deletions

View File

@ -8,6 +8,7 @@ using Microsoft.AspNetCore.Http;
namespace IW4MAdmin.Plugins.LiveRadar.Web.Controllers
{
[Route("Radar/{serverId}")]
public class RadarController : BaseController
{
private readonly IManager _manager;
@ -21,8 +22,7 @@ namespace IW4MAdmin.Plugins.LiveRadar.Web.Controllers
}
[HttpGet]
[Route("Radar/{serverId?}")]
public IActionResult Index(string serverId = null)
public IActionResult Index(string? serverId = null)
{
var servers = _manager.GetServers()
.Where(server => server.GameName == Server.Game.IW4)
@ -42,7 +42,7 @@ namespace IW4MAdmin.Plugins.LiveRadar.Web.Controllers
}
[HttpGet]
[Route("Radar/{serverId}/Map")]
[Route("Map")]
public IActionResult Map(string serverId = null)
{
var server = serverId == null
@ -67,7 +67,7 @@ namespace IW4MAdmin.Plugins.LiveRadar.Web.Controllers
}
[HttpGet]
[Route("Radar/{serverId}/Data")]
[Route("Data")]
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public IActionResult Data(string serverId = null)
{