diff --git a/progit/ui/fork.py b/progit/ui/fork.py index 5d866dc..fe4a3dc 100644 --- a/progit/ui/fork.py +++ b/progit/ui/fork.py @@ -58,8 +58,8 @@ def request_pulls(repo, username=None): ) -@APP.route('//request-pull/') -@APP.route('/fork///request-pull/') +@APP.route('//request-pull/') +@APP.route('/fork///request-pull/') def request_pull(repo, requestid, username=None): """ Request pulling the changes from the fork into the project. """ @@ -158,8 +158,8 @@ def request_pull(repo, requestid, username=None): mergeform=form, ) -@APP.route('//request-pull/.patch') -@APP.route('/fork///request-pull/.patch') +@APP.route('//request-pull/.patch') +@APP.route('/fork///request-pull/.patch') def request_pull_patch(repo, requestid, username=None): """ Returns the commits from the specified pull-request as patches. """ @@ -224,9 +224,9 @@ def request_pull_patch(repo, requestid, username=None): return flask.Response(patch, content_type="text/plain;charset=UTF-8") -@APP.route('//request-pull//comment//', +@APP.route('//request-pull//comment//', methods=('GET', 'POST')) -@APP.route('/fork///request-pull//comment/' +@APP.route('/fork///request-pull//comment/' '/', methods=('GET', 'POST')) def pull_request_add_comment(repo, requestid, commit, row, username=None): """ Add a comment to a commit in a pull-request. @@ -283,8 +283,8 @@ def pull_request_add_comment(repo, requestid, commit, row, username=None): -@APP.route('//request-pull/merge/', methods=['POST']) -@APP.route('/fork///request-pull/merge/', +@APP.route('//request-pull/merge/', methods=['POST']) +@APP.route('/fork///request-pull/merge/', methods=['POST']) def merge_request_pull(repo, requestid, username=None): """ Request pulling the changes from the fork into the project. @@ -392,9 +392,9 @@ def merge_request_pull(repo, requestid, username=None): return flask.redirect(flask.url_for('view_repo', repo=repo.name)) -@APP.route('//request-pull/cancel/', +@APP.route('//request-pull/cancel/', methods=['POST']) -@APP.route('/fork///request-pull/cancel/', +@APP.route('/fork///request-pull/cancel/', methods=['POST']) def cancel_request_pull(repo, requestid, username=None): """ Cancel request pulling request.