simplify: move subscribe form to GET /subscriptions/add

This commit is contained in:
blankie 2026-06-14 07:36:37 +00:00
parent a008bc7aed
commit 96603da142
2 changed files with 4 additions and 6 deletions

View file

@ -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)