mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-02-22 14:22:55 +01:00
feat: enforce order for charges ORDER BY "timestamp" DESC
This commit is contained in:
parent
ccae7876d9
commit
4fa8b5a292
1 changed files with 2 additions and 1 deletions
|
@ -88,7 +88,8 @@ async def get_charge(charge_id: str) -> Charges:
|
||||||
|
|
||||||
async def get_charges(user: str) -> List[Charges]:
|
async def get_charges(user: str) -> List[Charges]:
|
||||||
rows = await db.fetchall(
|
rows = await db.fetchall(
|
||||||
"""SELECT * FROM satspay.charges WHERE "user" = ?""", (user,)
|
"""SELECT * FROM satspay.charges WHERE "user" = ? ORDER BY "timestamp" DESC """,
|
||||||
|
(user,),
|
||||||
)
|
)
|
||||||
return [Charges.from_row(row) for row in rows]
|
return [Charges.from_row(row) for row in rows]
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue