From 65d9510f2724d45593ac1f776a33f15c6b92d9e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Hells=C3=A9n?= Date: Mon, 19 Dec 2022 22:54:00 +0100 Subject: [PATCH] Remove webhooks from /webhooks --- discord_rss_bot/main.py | 7 +------ discord_rss_bot/templates/webhooks.html | 18 ------------------ 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/discord_rss_bot/main.py b/discord_rss_bot/main.py index 60ed136..ee0ebc5 100644 --- a/discord_rss_bot/main.py +++ b/discord_rss_bot/main.py @@ -250,12 +250,7 @@ async def get_webhooks(request: Request) -> _TemplateResponse: Returns: HTMLResponse: The HTML response. """ - try: - webhooks = reader.get_tag((), "webhooks") - except TagNotFoundError: - webhooks = [] - context = {"request": request, "webhooks": webhooks} - return templates.TemplateResponse("webhooks.html", context) + return templates.TemplateResponse("webhooks.html", {"request": request}) @app.get("/", response_class=HTMLResponse) diff --git a/discord_rss_bot/templates/webhooks.html b/discord_rss_bot/templates/webhooks.html index dd8a75c..e985f54 100644 --- a/discord_rss_bot/templates/webhooks.html +++ b/discord_rss_bot/templates/webhooks.html @@ -28,23 +28,5 @@ -
- {% if webhooks %} - {% for webhook in webhooks %} -
- -
-
- -
-
-
- {% endfor %} - {% else %} -

No webhooks found.

- {% endif %} -
{% endblock %} \ No newline at end of file