Mercurial > kallithea
changeset 6091:e8136195daf0
routing: use POST to 'pullrequest_delete' instead of DELETE
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Thu, 04 Aug 2016 14:23:36 +0200 |
parents | 5d299d843b4e |
children | 5e0e297435a1 |
files | kallithea/config/routing.py kallithea/templates/pullrequests/pullrequest_data.html |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/config/routing.py Thu Aug 04 14:23:36 2016 +0200 +++ b/kallithea/config/routing.py Thu Aug 04 14:23:36 2016 +0200 @@ -673,10 +673,10 @@ action='post', conditions=dict(function=check_repo, method=["POST"])) rmap.connect('pullrequest_delete', - '/{repo_name:.*?}/pull-request/{pull_request_id}', + '/{repo_name:.*?}/pull-request/{pull_request_id}/delete', controller='pullrequests', action='delete', conditions=dict(function=check_repo, - method=["DELETE"])) + method=["POST"])) rmap.connect('pullrequest_show_all', '/{repo_name:.*?}/pull-request',
--- a/kallithea/templates/pullrequests/pullrequest_data.html Thu Aug 04 14:23:36 2016 +0200 +++ b/kallithea/templates/pullrequests/pullrequest_data.html Thu Aug 04 14:23:36 2016 +0200 @@ -60,7 +60,7 @@ </td> <td style="text-align:right"> %if pr.owner.user_id == c.authuser.user_id: - ${h.form(url('pullrequest_delete', repo_name=pr.other_repo.repo_name, pull_request_id=pr.pull_request_id),method='delete', style="display:inline-block")} + ${h.form(url('pullrequest_delete', repo_name=pr.other_repo.repo_name, pull_request_id=pr.pull_request_id), style="display:inline-block")} <button class="action_button" id="remove_${pr.pull_request_id}" name="remove_${pr.pull_request_id}"