add recent items to the get_all_favorites api route

This commit is contained in:
geoffrey45 committed 2023-04-30 15:38:38 +03:00
1 parent 3ddb6295c6
commit 5d0b59ea60
4 files changed
+71 -6

No files matched your search

+2 -1
View File
@@ -37,7 +37,8 @@ class SQLiteFavoriteMethods:
sql = """SELECT * FROM favorites"""
with SQLiteManager(userdata_db=True) as cur:
cur.execute(sql)
return cur.fetchall()
favs = cur.fetchall()
return [fav for fav in favs if fav[1] != ""]
@classmethod
def get_favorites(cls, fav_type: str) -> list[tuple]: