+ фильтр на Японию и Корею
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
7
main.py
7
main.py
@@ -298,6 +298,13 @@ def get_records(item: str = "default", offset: int = Query(0, ge=0), limit: int
|
||||
ORDER BY parsed_at DESC
|
||||
OFFSET %s LIMIT %s
|
||||
""", (offset, limit))
|
||||
elif item == "Япония" or item == "Корея":
|
||||
cur.execute("""
|
||||
SELECT * FROM url
|
||||
WHERE other = %s
|
||||
ORDER BY viewed ASC, article_date DESC
|
||||
OFFSET %s LIMIT %s
|
||||
""", (item, offset, limit))
|
||||
else:
|
||||
cur.execute("""
|
||||
SELECT * FROM url
|
||||
|
||||
Reference in New Issue
Block a user