This commit is contained in:
@@ -353,7 +353,7 @@ def get_all_sources(category: str):
|
||||
if category == "all":
|
||||
cur.execute("SELECT * FROM sourse")
|
||||
else:
|
||||
cur.execute("SELECT * FROM sourse WHERE category = %s", (category,))
|
||||
cur.execute("SELECT * FROM sourse WHERE promt = %s", (category,))
|
||||
rows = cur.fetchall()
|
||||
sources = [{"url": row["url"], "promt": row["promt"]} for row in rows]
|
||||
return {"sources": sources}
|
||||
|
||||
Reference in New Issue
Block a user