diff --git a/lnbits/extensions/shop/crud.py b/lnbits/extensions/shop/crud.py index 5e35e949..8ddd0a53 100644 --- a/lnbits/extensions/shop/crud.py +++ b/lnbits/extensions/shop/crud.py @@ -52,7 +52,7 @@ async def create_shop_product(data: createProduct) -> Products: 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()]) await db.execute( diff --git a/lnbits/extensions/shop/views.py b/lnbits/extensions/shop/views.py index 776246e9..1a2c07f9 100644 --- a/lnbits/extensions/shop/views.py +++ b/lnbits/extensions/shop/views.py @@ -39,7 +39,7 @@ async def index(request: Request, user: User = Depends(check_user_exists)): @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) products = await get_shop_products(stall_id) zones = [] @@ -68,7 +68,7 @@ async def display(request: Request, stall_id): @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) if not market: @@ -92,7 +92,7 @@ async def display(request: Request, market_id): @shop_ext.get("/order", response_class=HTMLResponse) -async def chat_page( +async def order_chat( request: Request, merch: str = Query(...), invoice_id: str = Query(...), diff --git a/lnbits/extensions/shop/views_api.py b/lnbits/extensions/shop/views_api.py index 9c852a2b..d9f0c80b 100644 --- a/lnbits/extensions/shop/views_api.py +++ b/lnbits/extensions/shop/views_api.py @@ -19,8 +19,8 @@ from lnbits.decorators import ( require_admin_key, require_invoice_key, ) +from lnbits.helpers import urlsafe_short_hash -from ...helpers import urlsafe_short_hash from . import db, shop_ext from .crud import ( create_shop_market,