From fb4bf0d469b51dd82ceb136e7109c4fb2a61c265 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Hells=C3=A9n?= Date: Sat, 10 Dec 2022 22:54:30 +0100 Subject: [PATCH] Remove /check --- discord_rss_bot/main.py | 9 --------- discord_rss_bot/templates/feed.html | 23 +++++++---------------- 2 files changed, 7 insertions(+), 25 deletions(-) diff --git a/discord_rss_bot/main.py b/discord_rss_bot/main.py index a7bbf4b..d4c0d45 100644 --- a/discord_rss_bot/main.py +++ b/discord_rss_bot/main.py @@ -65,15 +65,6 @@ def encode_url(url_to_quote: str) -> str: templates.env.filters["encode_url"] = encode_url -@app.post("/check", response_class=HTMLResponse) -def check_feed(request: Request, feed_url: str = Form()) -> _TemplateResponse: - """Check all feeds""" - send_to_discord(feed_url) - feed: Feed = reader.get_feed(feed_url) - - return templates.TemplateResponse("feed.html", {"request": request, "feed": feed}) - - @app.post("/add") async def create_feed(feed_url: str = Form(), webhook_dropdown: str = Form()) -> HTTPException | dict[str, str]: """ diff --git a/discord_rss_bot/templates/feed.html b/discord_rss_bot/templates/feed.html index 05ec466..ac19a2a 100644 --- a/discord_rss_bot/templates/feed.html +++ b/discord_rss_bot/templates/feed.html @@ -23,23 +23,14 @@ Last exception: {{ feed.last_exception }} {% endif %} - -
-
-
- -
-
-
-
- -
-
+
+
+ +
+
{% for entry in entries %} {% if loop.index > 1 %}