mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 14:04:26 +01:00
23 lines
598 B
C#
23 lines
598 B
C#
using BTCPayServer.HostedServices;
|
|
using BTCPayServer.Client.Models;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace BTCPayServer.Controllers.GreenField
|
|
{
|
|
[ApiController]
|
|
public class HealthController : ControllerBase
|
|
{
|
|
[AllowAnonymous]
|
|
[HttpGet("~/api/v1/health")]
|
|
public ActionResult GetHealth(NBXplorerDashboard dashBoard)
|
|
{
|
|
ApiHealthData model = new ApiHealthData()
|
|
{
|
|
Synchronized = dashBoard.IsFullySynched()
|
|
};
|
|
return Ok(model);
|
|
}
|
|
}
|
|
}
|