fix some bugs and format
This commit is contained in:
parent
cdb5e8176d
commit
ef73f3ca75
3 changed files with 5 additions and 5 deletions
|
|
@ -52,7 +52,7 @@ async def create_shop_product(data: createProduct) -> Products:
|
||||||
return product
|
return product
|
||||||
|
|
||||||
|
|
||||||
async def update_shop_product(product_id: str, **kwargs) -> Optional[Stalls]:
|
async def update_shop_product(product_id: str, **kwargs) -> Optional[Products]:
|
||||||
q = ", ".join([f"{field[0]} = ?" for field in kwargs.items()])
|
q = ", ".join([f"{field[0]} = ?" for field in kwargs.items()])
|
||||||
|
|
||||||
await db.execute(
|
await db.execute(
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ async def index(request: Request, user: User = Depends(check_user_exists)):
|
||||||
|
|
||||||
|
|
||||||
@shop_ext.get("/stalls/{stall_id}", response_class=HTMLResponse)
|
@shop_ext.get("/stalls/{stall_id}", response_class=HTMLResponse)
|
||||||
async def display(request: Request, stall_id):
|
async def stall(request: Request, stall_id):
|
||||||
stall = await get_shop_stall(stall_id)
|
stall = await get_shop_stall(stall_id)
|
||||||
products = await get_shop_products(stall_id)
|
products = await get_shop_products(stall_id)
|
||||||
zones = []
|
zones = []
|
||||||
|
|
@ -68,7 +68,7 @@ async def display(request: Request, stall_id):
|
||||||
|
|
||||||
|
|
||||||
@shop_ext.get("/market/{market_id}", response_class=HTMLResponse)
|
@shop_ext.get("/market/{market_id}", response_class=HTMLResponse)
|
||||||
async def display(request: Request, market_id):
|
async def market(request: Request, market_id):
|
||||||
market = await get_shop_market(market_id)
|
market = await get_shop_market(market_id)
|
||||||
|
|
||||||
if not market:
|
if not market:
|
||||||
|
|
@ -92,7 +92,7 @@ async def display(request: Request, market_id):
|
||||||
|
|
||||||
|
|
||||||
@shop_ext.get("/order", response_class=HTMLResponse)
|
@shop_ext.get("/order", response_class=HTMLResponse)
|
||||||
async def chat_page(
|
async def order_chat(
|
||||||
request: Request,
|
request: Request,
|
||||||
merch: str = Query(...),
|
merch: str = Query(...),
|
||||||
invoice_id: str = Query(...),
|
invoice_id: str = Query(...),
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,8 @@ from lnbits.decorators import (
|
||||||
require_admin_key,
|
require_admin_key,
|
||||||
require_invoice_key,
|
require_invoice_key,
|
||||||
)
|
)
|
||||||
|
from lnbits.helpers import urlsafe_short_hash
|
||||||
|
|
||||||
from ...helpers import urlsafe_short_hash
|
|
||||||
from . import db, shop_ext
|
from . import db, shop_ext
|
||||||
from .crud import (
|
from .crud import (
|
||||||
create_shop_market,
|
create_shop_market,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue