#region ========================================================================= USING =====================================================================================
using FastEndpoints;
using Lumina.Presentation.Api.Common.Routes.Maintenance;
using Lumina.Presentation.Api.Core.Endpoints.Common;
using Microsoft.AspNetCore.Http;
using System.Threading;
using System.Threading.Tasks;
#endregion
namespace Lumina.Presentation.Api.Core.Endpoints.Maintenance;
///
/// API endpoint for the /check-health route.
///
public class CheckHealthEndpoint : BaseEndpoint
{
///
/// Configures the API endpoint.
///
public override void Configure()
{
Verbs(FastEndpoints.Http.GET);
Routes(ApiRoutes.Health.CHECK_HEALTH);
Version(1);
AllowAnonymous();
DontCatchExceptions();
}
///
/// Gwts the health status of the backend system.
///
/// Cancellation token that can be used to stop the execution.
public override async Task ExecuteAsync(EmptyRequest _, CancellationToken cancellationToken)
{
// TODO: to be implemented.
return await Task.FromResult(TypedResults.Ok());
}
}