Mercurial > kallithea
changeset 5149:35120990752f
admin: use POST in routing for adding API keys for users - match template change in 6f6aab7ca754
author | Christian Oyarzun <oyarzun@gmail.com> |
---|---|
date | Thu, 21 May 2015 15:52:30 -0400 |
parents | 579110ca5178 |
children | 7409cfc1e961 |
files | kallithea/config/routing.py kallithea/tests/functional/test_admin_users.py |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/config/routing.py Mon May 04 21:07:37 2015 +0200 +++ b/kallithea/config/routing.py Thu May 21 15:52:30 2015 -0400 @@ -206,7 +206,7 @@ m.connect("edit_user_api_keys", "/users/{id}/edit/api_keys", action="edit_api_keys", conditions=dict(method=["GET"])) m.connect("edit_user_api_keys", "/users/{id}/edit/api_keys", - action="add_api_key", conditions=dict(method=["PUT"])) + action="add_api_key", conditions=dict(method=["POST"])) m.connect("edit_user_api_keys", "/users/{id}/edit/api_keys", action="delete_api_key", conditions=dict(method=["DELETE"]))
--- a/kallithea/tests/functional/test_admin_users.py Mon May 04 21:07:37 2015 +0200 +++ b/kallithea/tests/functional/test_admin_users.py Thu May 21 15:52:30 2015 -0400 @@ -451,7 +451,7 @@ user_id = user.user_id response = self.app.post(url('edit_user_api_keys', id=user_id), - {'_method': 'put', 'description': desc, 'lifetime': lifetime, '_authentication_token': self.authentication_token()}) + {'description': desc, 'lifetime': lifetime, '_authentication_token': self.authentication_token()}) self.checkSessionFlash(response, 'API key successfully created') try: response = response.follow() @@ -469,7 +469,7 @@ user_id = user.user_id response = self.app.post(url('edit_user_api_keys', id=user_id), - {'_method': 'put', 'description': 'desc', 'lifetime': -1, '_authentication_token': self.authentication_token()}) + {'description': 'desc', 'lifetime': -1, '_authentication_token': self.authentication_token()}) self.checkSessionFlash(response, 'API key successfully created') response = response.follow()