diff options
| author | LV-426 <lv-426@taproot.org.il> | 2014-09-29 17:28:49 +0300 |
|---|---|---|
| committer | LV-426 <lv-426@taproot.org.il> | 2014-09-29 19:55:15 +0300 |
| commit | 734c6f39e94600b90b417bd894503e00231d85af (patch) | |
| tree | 484047867b23c7f9726d2c20dd6e9cada0bfc426 /src-py | |
| parent | 0c7aa6f772c2a1352a2b643885baa9085886bfec (diff) | |
more response handling with __common_resp_handle()
Diffstat (limited to 'src-py')
| -rw-r--r-- | src-py/rhizi_api.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src-py/rhizi_api.py b/src-py/rhizi_api.py index c8a323df..eb76212e 100644 --- a/src-py/rhizi_api.py +++ b/src-py/rhizi_api.py @@ -39,6 +39,17 @@ def __response_wrap(data=None, error=None): """ return dict(data=data, error=error) +def __common_resp_handle(data=None, error=None): + """ + provide common response handling + """ + ret_data = __response_wrap(data, error) + resp = jsonify(ret_data) + + # more response processing + + return resp + @webapp.route("/load/node-single", methods=['POST']) def load_node_by_id_attr(): """ |
