mirror of
https://github.com/lnbits/lnbits.git
synced 2025-10-02 14:09:26 +02:00
fix awaits
This commit is contained in:
@@ -38,7 +38,7 @@ async def on_invoice_paid(payment: Payment) -> None:
|
||||
domain = await get_domain(subdomain.domain)
|
||||
|
||||
### Create subdomain
|
||||
cf_response = cloudflare_create_subdomain(
|
||||
cf_response = await cloudflare_create_subdomain(
|
||||
domain=domain,
|
||||
subdomain=subdomain.subdomain,
|
||||
record_type=subdomain.record_type,
|
||||
|
@@ -124,7 +124,7 @@ async def api_subdomain_make_subdomain(domain_id, data: CreateSubdomain):
|
||||
ip=data.ip,
|
||||
)
|
||||
if cf_response["success"] == True:
|
||||
cloudflare_deletesubdomain(domain=domain, domain_id=cf_response["result"]["id"])
|
||||
await cloudflare_deletesubdomain(domain=domain, domain_id=cf_response["result"]["id"])
|
||||
else:
|
||||
raise HTTPException(
|
||||
status_code=HTTPStatus.BAD_REQUEST,
|
||||
|
Reference in New Issue
Block a user