Revert "simplify: move subscribe form to GET /subscriptions/add"
This reverts commit 25e24efbfa.
This commit is contained in:
parent
492f98fed9
commit
a008bc7aed
2 changed files with 6 additions and 4 deletions
|
|
@ -59,8 +59,12 @@ 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(prefill_url=prefill_url)
|
||||
return handle_add_form(
|
||||
action_type=action_type if action_type == "subscribe" else "index",
|
||||
prefill_url=prefill_url,
|
||||
)
|
||||
elif path == "/pages":
|
||||
return handle_pages(query)
|
||||
elif path.startswith("/edit/"):
|
||||
|
|
@ -92,8 +96,6 @@ 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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue