add recent items to the get_all_favorites api route

This commit is contained in:
geoffrey45
2023-04-30 15:38:38 +03:00
parent 3ddb6295c6
commit 5d0b59ea60
4 changed files with 71 additions and 6 deletions
+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]: