Local Greenfield Client for Plugins (#2410)

* wip

* Local GreenField Client for Plugins

* support notification handlers being missing

* Initial support for scoped btcpay client

* test out scoped local client

* wip

* small fix

* Throw exception if using local greenfield client and it has not been implemented yet

* adapt based on new changes in BTCPay

* update

* fix tests

* Allow Local client to bypass authorization handler

* Add Misc endpoints to Local API Client

* Add new endpoints

* Apply code review changes
This commit is contained in:
Andrew Camilleri
2021-07-27 14:11:47 +02:00
committed by GitHub
parent 14e4d2d675
commit ba165ddd4f
22 changed files with 1065 additions and 106 deletions

View File

@@ -10,13 +10,19 @@ namespace BTCPayServer.Controllers.GreenField
[EnableCors(CorsPolicies.All)]
public class HealthController : ControllerBase
{
private readonly NBXplorerDashboard _dashBoard;
public HealthController(NBXplorerDashboard dashBoard )
{
_dashBoard = dashBoard;
}
[AllowAnonymous]
[HttpGet("~/api/v1/health")]
public ActionResult GetHealth(NBXplorerDashboard dashBoard)
public ActionResult GetHealth()
{
ApiHealthData model = new ApiHealthData()
{
Synchronized = dashBoard.IsFullySynched()
Synchronized = _dashBoard.IsFullySynched()
};
return Ok(model);
}