diff options
| author | LV-426 <lv-426@taproot.org.il> | 2014-09-28 18:30:52 +0300 |
|---|---|---|
| committer | LV-426 <lv-426@taproot.org.il> | 2014-09-28 18:30:52 +0300 |
| commit | 78149303d695475be310acf245323c058e84ca6d (patch) | |
| tree | b1668da8a2033f8a836139a671568bcb95b02f40 /src-py | |
| parent | 3bfd0208c04660539cced9a23584a4a39757e526 (diff) | |
__response_wrap on errror
Diffstat (limited to 'src-py')
| -rw-r--r-- | src-py/rhizi_api.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src-py/rhizi_api.py b/src-py/rhizi_api.py index 246768aa..7fb988e7 100644 --- a/src-py/rhizi_api.py +++ b/src-py/rhizi_api.py @@ -33,11 +33,12 @@ def load_node_by_id_attr(): op = dbc.DBO_load_node_set_by_id_attribute([node_id]) try: n = db_ctl.exec_op(op) - ret = __response_wrap(n) + ret = __response_wrap(data=n) return jsonify(ret) except Exception as e: - return jsonify('unable to load node with id: {0}'.format(node_id)) + return jsonify(__response_wrap(error='unable to load node with id: {0}'.format(node_id))) -@webapp.route("/add/node-single") +@webapp.route("/add/node-single", methods=['POST']) def add_node(n): + pass |
