todosrht: Fix 405 error when clicking 'next' in ticket list

When using the ticket preview feature, the URL would previously change
to /~user/tracker/submit. Attempting to navigate to the next page of
tickets afterwards would cause a 405 error since
/~user/tracker/submit?page=N is an invalid link.

Fix by changing the ticket submit route to /~user/tracker, so that
adding ?page=N results in a valid link.
This commit is contained in:
Adnan Maolood 2022-05-14 12:50:38 -04:00 committed by Drew DeVault
parent 833e2a5588
commit 5650249985
1 changed files with 1 additions and 1 deletions

View File

@ -181,7 +181,7 @@ def disable_notifications(owner, name):
db.session.commit()
return redirect(tracker_url(tracker))
@tracker.route("/<owner>/<name>/submit", methods=["POST"])
@tracker.route("/<owner>/<name>", methods=["POST"])
@loginrequired
def tracker_submit_POST(owner, name):
tracker, access = get_tracker(owner, name, True)