Remove /check
This commit is contained in:
@ -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]:
|
||||||
"""
|
"""
|
||||||
|
@ -23,23 +23,14 @@
|
|||||||
Last exception: {{ feed.last_exception }}
|
Last exception: {{ feed.last_exception }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="btn-group" role="group">
|
||||||
<div class="btn-toolbar" role="group">
|
<form action="/remove" method="post">
|
||||||
<div class="btn-group me-1" role="group">
|
<button class="btn btn-danger" type="submit" name="feed_url" value="{{ feed.url }}">
|
||||||
<form action="/check" method="post">
|
Remove feed
|
||||||
<button class="btn btn-primary" type="submit" name="feed_url" value="{{ feed.url }}">
|
</button>
|
||||||
Send new entries to Discord
|
</form>
|
||||||
</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
<div class="btn-group" role="group">
|
|
||||||
<form action="/remove" method="post">
|
|
||||||
<button class="btn btn-danger" type="submit" name="feed_url" value="{{ feed.url }}">
|
|
||||||
Remove feed
|
|
||||||
</button>
|
|
||||||
</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 %}
|
||||||
|
Reference in New Issue
Block a user