Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
7
main.py
7
main.py
@@ -305,6 +305,13 @@ def get_records(item: str = "default", offset: int = Query(0, ge=0), limit: int
|
||||
ORDER BY viewed ASC, article_date DESC
|
||||
OFFSET %s LIMIT %s
|
||||
""", (item, offset, limit))
|
||||
elif item == "Китай":
|
||||
cur.execute("""
|
||||
SELECT * FROM url
|
||||
WHERE other IN (%s, %s, %s)
|
||||
ORDER BY viewed ASC, article_date DESC
|
||||
OFFSET %s LIMIT %s
|
||||
""", ("source1", "source2", "Китай", offset, limit))
|
||||
else:
|
||||
cur.execute("""
|
||||
SELECT * FROM url
|
||||
|
||||
Reference in New Issue
Block a user