# HG changeset patch # User Mads Kiilerich # Date 2016-08-04 14:23:36 # Node ID e8136195daf0be62104f807fe78be63770606f3f # Parent 5d299d843b4e4e612cfdb658c64954b5a3e6b890 routing: use POST to 'pullrequest_delete' instead of DELETE diff --git a/kallithea/config/routing.py b/kallithea/config/routing.py --- a/kallithea/config/routing.py +++ b/kallithea/config/routing.py @@ -673,10 +673,10 @@ def make_map(config): 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', diff --git a/kallithea/templates/pullrequests/pullrequest_data.html b/kallithea/templates/pullrequests/pullrequest_data.html --- a/kallithea/templates/pullrequests/pullrequest_data.html +++ b/kallithea/templates/pullrequests/pullrequest_data.html @@ -60,7 +60,7 @@ %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")}