black
This commit is contained in:
@@ -93,11 +93,12 @@ async def api_lnurl_multi_response(request: Request, unique_hash, id_unique_hash
|
||||
|
||||
# CALLBACK
|
||||
|
||||
|
||||
@withdraw_ext.get(
|
||||
"/api/v1/lnurl/cb/{unique_hash}",
|
||||
status_code=HTTPStatus.OK,
|
||||
name="withdraw.api_lnurl_callback"
|
||||
)
|
||||
"/api/v1/lnurl/cb/{unique_hash}",
|
||||
status_code=HTTPStatus.OK,
|
||||
name="withdraw.api_lnurl_callback",
|
||||
)
|
||||
async def api_lnurl_callback(
|
||||
request: Request,
|
||||
unique_hash: str = Query(...),
|
||||
@@ -153,4 +154,3 @@ async def api_lnurl_callback(
|
||||
except Exception as e:
|
||||
await update_withdraw_link(link.id, **changesback)
|
||||
return {"status": "ERROR", "reason": "Link not working"}
|
||||
|
||||
|
||||
@@ -46,7 +46,9 @@ async def api_links(
|
||||
|
||||
|
||||
@withdraw_ext.get("/api/v1/links/{link_id}", status_code=HTTPStatus.OK)
|
||||
async def api_link_retrieve(link_id, request: Request, wallet: WalletTypeInfo = Depends(get_key_type)):
|
||||
async def api_link_retrieve(
|
||||
link_id, request: Request, wallet: WalletTypeInfo = Depends(get_key_type)
|
||||
):
|
||||
link = await get_withdraw_link(link_id, 0)
|
||||
|
||||
if not link:
|
||||
@@ -93,7 +95,9 @@ async def api_link_create_or_update(
|
||||
raise HTTPException(
|
||||
detail="Not your withdraw link.", status_code=HTTPStatus.FORBIDDEN
|
||||
)
|
||||
link = await update_withdraw_link(link_id, **data.dict(), usescsv=usescsv, used=0)
|
||||
link = await update_withdraw_link(
|
||||
link_id, **data.dict(), usescsv=usescsv, used=0
|
||||
)
|
||||
else:
|
||||
link = await create_withdraw_link(
|
||||
wallet_id=wallet.wallet.id, data=data, usescsv=usescsv
|
||||
|
||||
Reference in New Issue
Block a user