mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-14 00:16:57 +00:00
Minor
This commit is contained in:
1 parent
f3a508b7f2
commit
156171e8f1
1 file changed
+2
-2
@@ -321,8 +321,8 @@ class SerenaDashboardAPI:
|
||||
@self._app.route("/news_snippet_ids", methods=["GET"])
|
||||
def get_news_snippet_ids() -> dict[str, str | list[int]]:
|
||||
def _get_unread_news_ids() -> list[int]:
|
||||
all_news_files = (Path(REPO_ROOT) / "src" / "serena" / "resources" / "dashboard" / "news").glob("*.html")
|
||||
all_news_ids = sorted([int(f.stem) for f in all_news_files])
|
||||
all_news_files = (Path(SERENA_DASHBOARD_DIR) / "news").glob("*.html")
|
||||
all_news_ids = [int(f.stem) for f in all_news_files]
|
||||
news_snippet_id_file = SerenaPaths().news_snippet_id_file
|
||||
if not os.path.exists(news_snippet_id_file):
|
||||
return all_news_ids
|
||||
|
||||
Reference in new issue
Block a user