fix awaits

This commit is contained in:
Tiago vasconcelos
2021-11-08 12:28:11 +00:00
parent df0b38f346
commit 68dd95dc59
2 changed files with 2 additions and 2 deletions

View File

@@ -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,

View File

@@ -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,