simplify: move subscribe form to GET /subscriptions/add
This commit is contained in:
parent
f0735a2c2a
commit
06ad729168
2 changed files with 4 additions and 6 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue