mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 14:22:40 +01:00
Greenfield: Fix payment method update regression (#5932)
* Greenfield: Fix payment method update regression Do not exclude if `enabled` is `true`. Got introduced in #5809. * Fix PaymentMethodId Swagger docs
This commit is contained in:
parent
36cfc3648f
commit
76719cdc4a
3 changed files with 3 additions and 7 deletions
|
@ -115,7 +115,7 @@ namespace BTCPayServer.Controllers.Greenfield
|
||||||
if (request?.Enabled is { } enabled)
|
if (request?.Enabled is { } enabled)
|
||||||
{
|
{
|
||||||
var storeBlob = Store.GetStoreBlob();
|
var storeBlob = Store.GetStoreBlob();
|
||||||
storeBlob.SetExcluded(paymentMethodId, enabled);
|
storeBlob.SetExcluded(paymentMethodId, !enabled);
|
||||||
Store.SetStoreBlob(storeBlob);
|
Store.SetStoreBlob(storeBlob);
|
||||||
}
|
}
|
||||||
await _storeRepository.UpdateStore(Store);
|
await _storeRepository.UpdateStore(Store);
|
||||||
|
|
|
@ -108,7 +108,8 @@
|
||||||
},
|
},
|
||||||
"PaymentMethodId": {
|
"PaymentMethodId": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "Payment method IDs are a combination of crypto code and payment type. Available payment method IDs for Bitcoin are: \n- `\"BTC-OnChain\"` (with the equivalent of `\"BTC\"`) \n-`\"BTC-LightningLike\"`: Any supported LN-based payment method (Lightning or LNURL) \n- `\"BTC-LightningNetwork\"`: Lightning \n- `\"BTC-LNURLPAY\"`: LNURL \n \nNote: Separator can be either `-` or `_`."
|
"description": "Payment method IDs are a combination of crypto code and payment type. Available payment method IDs for Bitcoin are: \n- `\"BTC-CHAIN\"`: Onchain \n-`\"BTC-LN\"`: Lightning \n- `\"BTC-LNURL\"`: LNURL",
|
||||||
|
"example": "BTC-CHAIN"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"securitySchemes": {
|
"securitySchemes": {
|
||||||
|
|
|
@ -345,11 +345,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"PaymentMethodId": {
|
|
||||||
"type": "string",
|
|
||||||
"description": "The payment method id (`BTC-CHAIN`, `BTC-LN`, `BTC-LNURL`)",
|
|
||||||
"example": "BTC-CHAIN"
|
|
||||||
},
|
|
||||||
"GenericPaymentMethodData": {
|
"GenericPaymentMethodData": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
|
|
Loading…
Add table
Reference in a new issue