From d4a03623544aac0ce911d8471ff4b033bc3255e1 Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Mon, 17 Aug 2026 20:06:22 +0200 Subject: feat(sender): add manual source rescan action Add an authenticated action to queue a source rescan from the sent Webmentions overview. Extract the reusable confirmation modal and its JavaScript so received and sent admin actions share the same implementation. --- webmentions_ssg/views.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'webmentions_ssg/views.py') diff --git a/webmentions_ssg/views.py b/webmentions_ssg/views.py index eeea765..13e5086 100644 --- a/webmentions_ssg/views.py +++ b/webmentions_ssg/views.py @@ -22,6 +22,7 @@ from . import CSRF, forms from . import DATABASE as db from .models import ReceivedWebmention, Source, User from .tasks.receiver import verify_webmention +from .tasks.scanner import manual_scan_sources root_page = Blueprint("root", __name__) @@ -138,7 +139,22 @@ def sent() -> ResponseReturnValue: .order_by(Source.last_seen_at.desc()), per_page=25, ) - return render_template("sent.html", title="Sent Webmentions", sources=sources) + return render_template( + "sent.html", + title="Sent Webmentions", + sources=sources, + action_form=forms.AdminActionForm(), + ) + + +@root_page.post("/sent/rescan") +@login_required +def rescan_sent_sources(): + form = forms.AdminActionForm() + if form.validate_on_submit(): + manual_scan_sources() + flash("Source rescan queued.", "success") + return redirect(url_for("root.sent")) @root_page.route("/sent/") -- cgit v1.3.1