diff options
| author | LV-426 <lv-426@taproot.org.il> | 2015-04-30 02:04:30 +0300 |
|---|---|---|
| committer | LV-426 <lv-426@taproot.org.il> | 2015-04-30 02:04:30 +0300 |
| commit | 0c18e3de45c432ee1ed955f0bc543d695189d0e0 (patch) | |
| tree | ff9dfc28899f3c798c9880cda12a4815f4a93c47 /src | |
| parent | 13a846813a1cf192355485197fc144d37e34eb63 (diff) | |
add '/api' prefix to REST api calls, help differentiate from end-user HTTP paths
Diffstat (limited to 'src')
| -rw-r--r-- | src/client/rz_api_backend.js | 4 | ||||
| -rw-r--r-- | src/server/rz_server.py | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/client/rz_api_backend.js b/src/client/rz_api_backend.js index 9401e6f1..9b360f75 100644 --- a/src/client/rz_api_backend.js +++ b/src/client/rz_api_backend.js @@ -237,7 +237,7 @@ define(['util', 'model/core'], function(util, model_core) { this.rzdoc_create = function(rzdoc_name, on_success, on_error) { var req_opts = { type : 'POST' }; - return ajax_rs('/rzdoc/' + rzdoc_name + '/create', req_opts, on_success, on_error); + return ajax_rs('/api/rzdoc/' + rzdoc_name + '/create', req_opts, on_success, on_error); } /** @@ -246,7 +246,7 @@ define(['util', 'model/core'], function(util, model_core) { this.rzdoc_list = function(on_success, on_error) { var req_opts = { type : 'POST' }; - return ajax_rs('/rzdoc/list', req_opts, on_success, on_error); + return ajax_rs('/api/rzdoc/list', req_opts, on_success, on_error); } } diff --git a/src/server/rz_server.py b/src/server/rz_server.py index f04f5cef..7de9cd4e 100644 --- a/src/server/rz_server.py +++ b/src/server/rz_server.py @@ -348,10 +348,10 @@ def init_rest_interface(cfg, flask_webapp): # doc endpoints rest_entry('/rz/<path:rzdoc_name>', rz_api_rest.rzdoc__via_rz_url, {'methods': ['GET']}), # pretty URLs - rest_entry('/graph/clone', rz_api_rest.rzdoc_clone), - rest_entry('/rzdoc/list', rz_api_rest.rzdoc__list), - rest_entry('/rzdoc/<path:rzdoc_name>/create', rz_api_rest.rzdoc__create), - rest_entry('/rzdoc/<path:rzdoc_name>/delete', rz_api_rest.rzdoc__delete, {'methods': ['DELETE']}), + rest_entry('/api/graph/clone', rz_api_rest.rzdoc_clone), + rest_entry('/api/rzdoc/list', rz_api_rest.rzdoc__list), + rest_entry('/api/rzdoc/<path:rzdoc_name>/create', rz_api_rest.rzdoc__create), + rest_entry('/api/rzdoc/<path:rzdoc_name>/delete', rz_api_rest.rzdoc__delete, {'methods': ['GET', 'DELETE']}), # upload endpoints - this might change to external later, keep minimal and separate rest_entry('/blob/upload', rz_blob.upload, {'methods': ['POST']}), |
