From a9cf9fb0960413f7393c0115a681fc041a62b7ec Mon Sep 17 00:00:00 2001 From: blankie Date: Sun, 14 Jun 2026 07:36:37 +0000 Subject: [PATCH] simplify: move subscribe form to GET /subscriptions/add --- handlers/__init__.py | 8 +++----- handlers/subscriptions.py | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/handlers/__init__.py b/handlers/__init__.py index 95d1753..f05dabb 100644 --- a/handlers/__init__.py +++ b/handlers/__init__.py @@ -59,12 +59,8 @@ def _dispatch_inner(data): if path == "/": return handle_search(query) elif path == "/add": - action_type = query.get("type", ["index"])[0] prefill_url = query.get("url", [""])[0].strip() - return handle_add_form( - action_type=action_type if action_type == "subscribe" else "index", - prefill_url=prefill_url, - ) + return handle_add_form(prefill_url=prefill_url) elif path == "/pages": return handle_pages(query) elif path.startswith("/edit/"): @@ -96,6 +92,8 @@ def _dispatch_inner(data): return handle_api_sites(query) elif path == "/subscriptions": return handle_subscriptions() + elif path == "/subscriptions/add": + return handle_add_form(action_type="subscribe") elif path.startswith("/subscriptions/browse/"): sid = extract_id("/subscriptions/browse/") return handle_subscription_browse(sid) if sid is not None else _error(400) diff --git a/handlers/subscriptions.py b/handlers/subscriptions.py index b54a253..e0ecf68 100644 --- a/handlers/subscriptions.py +++ b/handlers/subscriptions.py @@ -198,7 +198,7 @@ def handle_subscriptions(msg=""): f' ' f'' f'' - f'

or subscribe to an instance

' + f'

or subscribe to an instance

' f'

{msg}

' f'
{listing}' f'
back'