mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-30 01:37:17 +00:00
chg: [API json import] take list as imput
This commit is contained in:
parent
8d727cbd31
commit
6f3cb17beb
1 changed files with 5 additions and 3 deletions
|
@ -104,6 +104,8 @@ def api_import_json_item(data_json):
|
|||
return ({'status': 'error', 'reason': 'Malformed JSON'}, 400)
|
||||
|
||||
# # TODO: add JSON verification
|
||||
res = add_json_to_json_queue(data_json)
|
||||
if not res:
|
||||
return ({'status': 'success'}, 200)
|
||||
for item_json in data_json:
|
||||
res = add_json_to_json_queue(item_json)
|
||||
if res:
|
||||
return ({'status': 'error'}, 400)
|
||||
return ({'status': 'success'}, 200)
|
||||
|
|
Loading…
Reference in a new issue