Trying to fix conflict errors

This commit is contained in:
ben
2022-11-28 15:23:49 +02:00
committed by Vlad Stan
parent 769bce0f94
commit 16183a0317
2 changed files with 9 additions and 4 deletions
+4 -2
View File
@@ -12,7 +12,7 @@ from . import db
from .helpers import fetch_onchain_balance
from .models import Charges, CreateCharge, SatsPayThemes
from loguru import logger
###############CHARGES##########################
@@ -52,8 +52,8 @@ async def create_charge(user: str, data: CreateCharge) -> Charges:
completelink,
completelinktext,
time,
custom_css,
amount,
custom_css,
balance,
extra,
custom_css,
@@ -79,6 +79,7 @@ async def create_charge(user: str, data: CreateCharge) -> Charges:
data.extra,
),
)
logger.debug(await get_charge(charge_id))
return await get_charge(charge_id)
@@ -93,6 +94,7 @@ async def update_charge(charge_id: str, **kwargs) -> Optional[Charges]:
async def get_charge(charge_id: str) -> Charges:
row = await db.fetchone("SELECT * FROM satspay.charges WHERE id = ?", (charge_id,))
return Charges.from_row(row) if row else None