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) domain = await get_domain(subdomain.domain)
### Create subdomain ### Create subdomain
cf_response = cloudflare_create_subdomain( cf_response = await cloudflare_create_subdomain(
domain=domain, domain=domain,
subdomain=subdomain.subdomain, subdomain=subdomain.subdomain,
record_type=subdomain.record_type, record_type=subdomain.record_type,

View file

@ -124,7 +124,7 @@ async def api_subdomain_make_subdomain(domain_id, data: CreateSubdomain):
ip=data.ip, ip=data.ip,
) )
if cf_response["success"] == True: 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: else:
raise HTTPException( raise HTTPException(
status_code=HTTPStatus.BAD_REQUEST, status_code=HTTPStatus.BAD_REQUEST,