Changeset - 062aa22363a1
[Not reviewed]
default
0 3 0
Mads Kiilerich - 9 years ago 2016-08-04 14:23:36
madski@unity3d.com
routing: use POST to 'update_repo' instead of PUT
3 files changed with 5 insertions and 5 deletions:
0 comments (0 inline, 0 general)
kallithea/config/routing.py
Show inline comments
 
@@ -119,8 +119,8 @@ def make_map(config):
 
                  action="index", conditions=dict(method=["GET"]))
 
        m.connect("new_repo", "/create_repository",
 
                  action="create_repository", conditions=dict(method=["GET"]))
 
        m.connect("put_repo", "/repos/{repo_name:.*?}",
 
                  action="update", conditions=dict(method=["PUT"],
 
        m.connect("update_repo", "/repos/{repo_name:.*?}",
 
                  action="update", conditions=dict(method=["POST"],
 
                  function=check_repo))
 
        m.connect("delete_repo", "/repos/{repo_name:.*?}/delete",
 
                  action="delete", conditions=dict(method=["POST"]))
kallithea/templates/admin/repos/repo_edit_settings.html
Show inline comments
 
${h.form(url('put_repo', repo_name=c.repo_info.repo_name), method='put')}
 
${h.form(url('update_repo', repo_name=c.repo_info.repo_name))}
 
    <div class="form">
 
        <!-- fields -->
 
        <div class="fields">
kallithea/tests/functional/test_admin_repos.py
Show inline comments
 
@@ -444,7 +444,7 @@ class _BaseTestCase(TestController):
 
        assert perm[0].permission.permission_name == 'repository.read'
 
        assert Repository.get_by_repo_name(self.REPO).private == False
 

	
 
        response = self.app.put(url('put_repo', repo_name=self.REPO),
 
        response = self.app.post(url('update_repo', repo_name=self.REPO),
 
                        fixture._get_repo_create_params(repo_private=1,
 
                                                repo_name=self.REPO,
 
                                                repo_type=self.REPO_TYPE,
 
@@ -459,7 +459,7 @@ class _BaseTestCase(TestController):
 
        assert len(perm), 1
 
        assert perm[0].permission.permission_name == 'repository.none'
 

	
 
        response = self.app.put(url('put_repo', repo_name=self.REPO),
 
        response = self.app.post(url('update_repo', repo_name=self.REPO),
 
                        fixture._get_repo_create_params(repo_private=False,
 
                                                repo_name=self.REPO,
 
                                                repo_type=self.REPO_TYPE,
0 comments (0 inline, 0 general)