INNER CODE UNIT · Python
list_orders
liyupi/free-video-downloader · backend/api_payment.py:150
async def list_orders(user: dict = Depends(get_current_user)):
orders = get_user_orders(user["id"])
return {
"success": True,
"data": [
{
"order_no": o["order_no"],
"amount": o["amount"],
"currency": o["currency"],
"status": o["status"],
"plan_type": o["plan_type"],
"created_at": o["created_at"],
"paid_at": o["paid_at"],
}
for o in orders
],
}