using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using MoonlightServers.Daemon.Services; using MoonlightServers.DaemonShared.Http.Daemon; namespace MoonlightServers.Daemon.Http.Controllers; [Authorize] [ApiController] [Route("api/health")] public class HealthController : Controller { private readonly RemoteService RemoteService; public HealthController(RemoteService remoteService) { RemoteService = remoteService; } [HttpGet] public async Task> GetAsync() { var remoteStatusCode = await RemoteService.CheckReachabilityAsync(); return new HealthDto() { RemoteStatusCode = remoteStatusCode }; } }