fix validation rules so description_hash works.
This commit is contained in:
+1
-1
@@ -115,7 +115,7 @@ def get_wallet(wallet_id: str) -> Optional[Wallet]:
|
||||
def get_wallet_for_key(key: str, key_type: str = "invoice") -> Optional[Wallet]:
|
||||
with open_db() as db:
|
||||
row = db.fetchone(
|
||||
f"""
|
||||
"""
|
||||
SELECT *, COALESCE((SELECT balance FROM balances WHERE wallet = wallets.id), 0) AS balance_msat
|
||||
FROM wallets
|
||||
WHERE adminkey = ? OR inkey = ?
|
||||
|
||||
@@ -28,8 +28,8 @@ def api_payments():
|
||||
@api_validate_post_request(
|
||||
schema={
|
||||
"amount": {"type": "integer", "min": 1, "required": True},
|
||||
"memo": {"type": "string", "empty": False, "required": False},
|
||||
"description_hash": {"type": "string", "empty": False, "required": False},
|
||||
"memo": {"type": "string", "empty": False, "required": True, "excludes": "description_hash"},
|
||||
"description_hash": {"type": "string", "empty": False, "required": True, "excludes": "memo"},
|
||||
}
|
||||
)
|
||||
def api_payments_create_invoice():
|
||||
|
||||
Reference in New Issue
Block a user