Skip to content

Commit

Permalink
python: #310
Browse files Browse the repository at this point in the history
  • Loading branch information
misodengaku committed Nov 22, 2023
1 parent ed35236 commit f7d2553
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webapp/python/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def search_livestreams_handler() -> tuple[list[dict[str, Any]], int]:
raise HttpException("tag not match", INTERNAL_SERVER_ERROR)
tag_id_list = list(map(lambda x: x["id"], tags))

sql = "SELECT * FROM livestream_tags WHERE tag_id IN (%s)" # idかtag_idか要確認
sql = "SELECT * FROM livestream_tags WHERE tag_id IN (%s) ORDER BY livestream_id DESC" # idかtag_idか要確認
in_formats = ",".join(["%s"] * len(tag_id_list))
sql = sql % in_formats
c.execute(sql, tag_id_list)
Expand All @@ -278,7 +278,7 @@ def search_livestreams_handler() -> tuple[list[dict[str, Any]], int]:

else:
# 検索条件なし
sql = "SELECT * FROM livestreams"
sql = "SELECT * FROM livestreams ORDER BY id DESC"
args = []
if limit_str:
sql += " LIMIT %s"
Expand Down

0 comments on commit f7d2553

Please sign in to comment.