mirror of
https://github.com/lnbits/lnbits.git
synced 2025-08-03 07:22:28 +02:00
fix some bugs and format
This commit is contained in:
@@ -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(
|
||||
|
@@ -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(...),
|
||||
|
@@ -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,
|
||||
|
Reference in New Issue
Block a user