Remove /check

This commit is contained in:
2022-12-10 22:54:30 +01:00
parent d086df4bee
commit fb4bf0d469
2 changed files with 7 additions and 25 deletions

View File

@ -65,15 +65,6 @@ def encode_url(url_to_quote: str) -> str:
templates.env.filters["encode_url"] = encode_url 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") @app.post("/add")
async def create_feed(feed_url: str = Form(), webhook_dropdown: str = Form()) -> HTTPException | dict[str, str]: async def create_feed(feed_url: str = Form(), webhook_dropdown: str = Form()) -> HTTPException | dict[str, str]:
""" """

View File

@ -23,15 +23,6 @@
Last exception: {{ feed.last_exception }} Last exception: {{ feed.last_exception }}
{% endif %} {% endif %}
<div class="btn-toolbar" role="group">
<div class="btn-group me-1" role="group">
<form action="/check" method="post">
<button class="btn btn-primary" type="submit" name="feed_url" value="{{ feed.url }}">
Send new entries to Discord
</button>
</form>
</div>
<div class="btn-group" role="group"> <div class="btn-group" role="group">
<form action="/remove" method="post"> <form action="/remove" method="post">
<button class="btn btn-danger" type="submit" name="feed_url" value="{{ feed.url }}"> <button class="btn btn-danger" type="submit" name="feed_url" value="{{ feed.url }}">
@ -39,7 +30,7 @@
</button> </button>
</form> </form>
</div> </div>
</div>
<div class="p-2 border border-dark" style="background:#0F0F0F"> <div class="p-2 border border-dark" style="background:#0F0F0F">
{% for entry in entries %} {% for entry in entries %}
{% if loop.index > 1 %} {% if loop.index > 1 %}