mirror of
https://github.com/Routstr/routstr-core.git
synced 2026-10-05 12:28:22 +00:00
simplified key_expiry_time header logic
This commit is contained in:
+1
-1
@@ -7,5 +7,5 @@ wallet.sqlite3
|
||||
.notes
|
||||
.*keys.db
|
||||
.*wallet.sqlite3
|
||||
.models.json
|
||||
.*models.json
|
||||
compose.override.yml
|
||||
+4
-6
@@ -37,16 +37,14 @@ async def proxy(
|
||||
content="Invalid Key-Expiry-Time: must be a valid Unix timestamp",
|
||||
status_code=400,
|
||||
)
|
||||
else:
|
||||
key_expiry_time = None
|
||||
|
||||
if(key_expiry_time and not refund_address):
|
||||
return Response(
|
||||
if(not refund_address):
|
||||
return Response(
|
||||
content=f"Error: Refund-LNURL header required when using Key-Expiry-Time",
|
||||
status_code=400,
|
||||
)
|
||||
else:
|
||||
key_expiry_time = None
|
||||
|
||||
|
||||
key = await validate_bearer_key(bearer_key, session, refund_address, key_expiry_time)
|
||||
|
||||
# Pre-validate JSON for requests that require it
|
||||
|
||||
Reference in New Issue
Block a user