Skip to content

Commit

Permalink
[master,bugfix,routing][xs]: correct bug introduced in f82f3b9 whereb…
Browse files Browse the repository at this point in the history
…y conditions for datastore write were GET/POST/DELETE rather than PUT/POST/DELETE.
  • Loading branch information
rufuspollock committed Mar 21, 2012
1 parent 4dae5b4 commit 163ea7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ckan/config/routing.py
Expand Up @@ -25,7 +25,7 @@ def make_map():
DELETE = dict(method=['DELETE'])
GET_POST = dict(method=['GET', 'POST'])
PUT_POST = dict(method=['PUT','POST'])
GET_POST_DELETE = dict(method=['GET', 'POST', 'DELETE'])
PUT_POST_DELETE = dict(method=['PUT', 'POST', 'DELETE'])
OPTIONS = dict(method=['OPTIONS'])

from ckan.lib.plugins import register_package_plugins
Expand Down Expand Up @@ -139,7 +139,7 @@ def make_map():
m.connect('datastore_read', '/api/data/{id}{url:(/.*)?}',
action='read', url='', conditions=GET)
m.connect('datastore_write', '/api/data/{id}{url:(/.*)?}',
action='write', url='', conditions=GET_POST_DELETE)
action='write', url='', conditions=PUT_POST_DELETE)


map.redirect('/packages', '/dataset')
Expand Down

0 comments on commit 163ea7b

Please sign in to comment.