feat: show paid and shipped statues

This commit is contained in:
Vlad Stan 2023-03-07 10:40:00 +02:00
parent 40c25ad085
commit aa7e30e5f9
2 changed files with 19 additions and 4 deletions

View file

@ -364,7 +364,7 @@ async def get_order_by_event_id(user_id: str, event_id: str) -> Optional[Order]:
async def get_orders(user_id: str) -> List[Order]:
rows = await db.fetchall(
"SELECT * FROM nostrmarket.orders WHERE user_id = ?",
"SELECT * FROM nostrmarket.orders WHERE user_id = ? ORDER BY time DESC",
(user_id,),
)
return [Order.from_row(row) for row in rows]
@ -372,7 +372,7 @@ async def get_orders(user_id: str) -> List[Order]:
async def get_orders_for_stall(user_id: str, stall_id: str) -> List[Order]:
rows = await db.fetchall(
"SELECT * FROM nostrmarket.orders WHERE user_id = ? AND stall_id = ?",
"SELECT * FROM nostrmarket.orders WHERE user_id = ? AND stall_id = ? ORDER BY time DESC",
(
user_id,
stall_id,