btcpayserver/BTCPayServer/Controllers/GreenField/HealthController.cs

23 lines
595 B
C#
Raw Normal View History

using BTCPayServer.HostedServices;
using BTCPayServer.Client.Models;
2020-04-16 15:39:08 +02:00
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace BTCPayServer.Controllers.GreenField
{
2020-04-21 17:09:17 +02:00
[Controller]
2020-04-16 15:39:08 +02:00
public class HealthController : ControllerBase
{
[AllowAnonymous]
[HttpGet("~/api/v1/health")]
public ActionResult GetHealth(NBXplorerDashboard dashBoard)
2020-04-16 15:39:08 +02:00
{
ApiHealthData model = new ApiHealthData()
{
Synchronized = dashBoard.IsFullySynched()
};
return Ok(model);
2020-04-16 15:39:08 +02:00
}
}
}