mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 06:24:24 +01:00
Greenfield: Add balance endpoint (#3887)
* Greenfield: Add balance endpoint * Remove superfluous try/catch
This commit is contained in:
@@ -26,7 +26,6 @@ namespace BTCPayServer.Controllers.Greenfield
|
||||
private readonly LightningClientFactoryService _lightningClientFactory;
|
||||
private readonly IOptions<LightningNetworkOptions> _lightningNetworkOptions;
|
||||
|
||||
|
||||
public GreenfieldInternalLightningNodeApiController(
|
||||
BTCPayNetworkProvider btcPayNetworkProvider, PoliciesSettings policiesSettings, LightningClientFactoryService lightningClientFactory,
|
||||
IOptions<LightningNetworkOptions> lightningNetworkOptions,
|
||||
@@ -46,6 +45,14 @@ namespace BTCPayServer.Controllers.Greenfield
|
||||
return base.GetInfo(cryptoCode, cancellationToken);
|
||||
}
|
||||
|
||||
[Authorize(Policy = Policies.CanUseInternalLightningNode,
|
||||
AuthenticationSchemes = AuthenticationSchemes.Greenfield)]
|
||||
[HttpGet("~/api/v1/server/lightning/{cryptoCode}/balance")]
|
||||
public override Task<IActionResult> GetBalance(string cryptoCode, CancellationToken cancellationToken = default)
|
||||
{
|
||||
return base.GetBalance(cryptoCode, cancellationToken);
|
||||
}
|
||||
|
||||
[Authorize(Policy = Policies.CanUseInternalLightningNode,
|
||||
AuthenticationSchemes = AuthenticationSchemes.Greenfield)]
|
||||
[HttpPost("~/api/v1/server/lightning/{cryptoCode}/connect")]
|
||||
|
||||
Reference in New Issue
Block a user