fix: timestamp does not exist on themes

This commit is contained in:
Vlad Stan
2022-11-28 10:53:16 +02:00
parent 58eefd4d30
commit 7380c37c73

View File

@@ -197,7 +197,7 @@ async def save_theme(data: SatsPayThemes, css_id: str = None):
INSERT INTO satspay.themes ( INSERT INTO satspay.themes (
css_id, css_id,
title, title,
user, "user",
custom_css custom_css
) )
VALUES (?, ?, ?, ?) VALUES (?, ?, ?, ?)
@@ -219,7 +219,7 @@ async def get_theme(css_id: str) -> SatsPayThemes:
async def get_themes(user_id: str) -> List[SatsPayThemes]: async def get_themes(user_id: str) -> List[SatsPayThemes]:
rows = await db.fetchall( rows = await db.fetchall(
"""SELECT * FROM satspay.themes WHERE "user" = ? ORDER BY "timestamp" DESC """, """SELECT * FROM satspay.themes WHERE "user" = ? ORDER BY "title" DESC """,
(user_id,), (user_id,),
) )
return [SatsPayThemes.from_row(row) for row in rows] return [SatsPayThemes.from_row(row) for row in rows]