mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 18:11:36 +01:00
23 lines
595 B
C#
23 lines
595 B
C#
using BTCPayServer.Client.Models;
|
|
using BTCPayServer.HostedServices;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace BTCPayServer.Controllers.GreenField
|
|
{
|
|
[Controller]
|
|
public class HealthController : ControllerBase
|
|
{
|
|
[AllowAnonymous]
|
|
[HttpGet("~/api/v1/health")]
|
|
public ActionResult GetHealth(NBXplorerDashboard dashBoard)
|
|
{
|
|
ApiHealthData model = new ApiHealthData()
|
|
{
|
|
Synchronized = dashBoard.IsFullySynched()
|
|
};
|
|
return Ok(model);
|
|
}
|
|
}
|
|
}
|