black formatting
This commit is contained in:
@@ -6,6 +6,7 @@ from . import db
|
||||
from .models import Tickets, Forms
|
||||
import httpx
|
||||
|
||||
|
||||
async def create_ticket(
|
||||
payment_hash: str,
|
||||
wallet: str,
|
||||
@@ -52,19 +53,14 @@ async def set_ticket_paid(payment_hash: str) -> Tickets:
|
||||
""",
|
||||
(amount, row[1]),
|
||||
)
|
||||
|
||||
|
||||
ticket = await get_ticket(payment_hash)
|
||||
if formdata.webhook:
|
||||
async with httpx.AsyncClient() as client:
|
||||
try:
|
||||
r = await client.post(
|
||||
formdata.webhook,
|
||||
json={
|
||||
"form": ticket.form,
|
||||
"name": ticket.name,
|
||||
"email": ticket.email,
|
||||
"content": ticket.ltext
|
||||
},
|
||||
json={"form": ticket.form, "name": ticket.name, "email": ticket.email, "content": ticket.ltext},
|
||||
timeout=40,
|
||||
)
|
||||
except AssertionError:
|
||||
@@ -96,7 +92,9 @@ async def delete_ticket(ticket_id: str) -> None:
|
||||
# FORMS
|
||||
|
||||
|
||||
async def create_form(*, wallet: str, name: str, webhook: Optional[str] = None, description: str, costpword: int) -> Forms:
|
||||
async def create_form(
|
||||
*, wallet: str, name: str, webhook: Optional[str] = None, description: str, costpword: int
|
||||
) -> Forms:
|
||||
form_id = urlsafe_short_hash()
|
||||
await db.execute(
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user