diff --git a/bin/packages/Tag.py b/bin/packages/Tag.py index eb5a5bb3..5d717bb7 100755 --- a/bin/packages/Tag.py +++ b/bin/packages/Tag.py @@ -141,14 +141,14 @@ def remove_item_tags(tags=[], item_id=None): return ({'status': 'error', 'reason': 'No Tag(s) specified'}, 400) dict_res = {} - dict_res[tags] = [] + dict_res['tags'] = [] for tag in tags: res = remove_item_tag(tag, item_id) if res[1] != 200: return res else: dict_res[tags].append(tag) - dict_res[id] = item_id + dict_res['id'] = item_id return (dict_res, 200) # TEMPLATE + API QUERY diff --git a/doc/README.md b/doc/README.md index 44613c26..a47f4923 100644 --- a/doc/README.md +++ b/doc/README.md @@ -82,8 +82,8 @@ curl https://127.0.0.1:7000/api/get/item/info/submitted/2019/07/26/3efb8a79-08e9 **HTTP Status Code** : `400` -``` - {'status': 'error', 'reason': 'Item not found'} +```json + {"status": "error", "reason": "Item not found"} ``` @@ -129,8 +129,8 @@ curl https://127.0.0.1:7000/api/get/item/content/submitted/2019/07/26/3efb8a79-0 **HTTP Status Code** : `400` -``` - {'status': 'error', 'reason': 'Item not found'} +```json + {"status": "error", "reason": "Item not found"} ``` @@ -182,8 +182,8 @@ curl https://127.0.0.1:7000/api/get/item/tag/submitted/2019/07/26/3efb8a79-08e9- **HTTP Status Code** : `400` -``` - {'status': 'error', 'reason': 'Item not found'} +```json + {"status": "error", "reason": "Item not found"} ``` @@ -253,10 +253,10 @@ curl https://127.0.0.1:7000/api/import/item --header "Authorization: iHc1_ChZxj1 #### Expected Fail Response **HTTP Status Code** : `400` -``` - {'status': 'error', 'reason': 'Item id not found'} - {'status': 'error', 'reason': 'Tags or Galaxy not specified'} - {'status': 'error', 'reason': 'Tags or Galaxy not enabled'} +```json + {"status": "error", "reason": "Item id not found"} + {"status": "error", "reason": "Tags or Galaxy not specified"} + {"status": "error", "reason": "Tags or Galaxy not enabled"} ``` @@ -321,9 +321,9 @@ curl https://127.0.0.1:7000/api/delete/item/tag --header "Authorization: iHc1_Ch #### Expected Fail Response **HTTP Status Code** : `400` -``` - {'status': 'error', 'reason': 'Item id not found'} - {'status': 'error', 'reason': 'No Tag(s) specified'} +```json + {"status": "error", "reason": "Item id not found"} + {"status": "error", "reason": "No Tag(s) specified"} ``` @@ -398,11 +398,11 @@ curl https://127.0.0.1:7000/api/import/item --header "Authorization: iHc1_ChZxj1 #### Expected Fail Response **HTTP Status Code** : `400` -``` - {'status': 'error', 'reason': 'Malformed JSON'} - {'status': 'error', 'reason': 'No text supplied'} - {'status': 'error', 'reason': 'Tags or Galaxy not enabled'} - {'status': 'error', 'reason': 'Size exceeds default'} +```json + {"status": "error", "reason": "Malformed JSON"} + {"status": "error", "reason": "No text supplied"} + {"status": "error", "reason": "Tags or Galaxy not enabled"} + {"status": "error", "reason": "Size exceeds default"} ``` @@ -458,7 +458,7 @@ curl -k https://127.0.0.1:7000/api/import/item/b20a69f1-99ad-4cb3-b212-7ce24b763 **HTTP Status Code** : `400` -``` - {'status': 'error', 'reason': 'Invalid uuid'} - {'status': 'error', 'reason': 'Unknow uuid'} +```json + {"status": "error", "reason": "Invalid uuid"} + {"status": "error", "reason": "Unknow uuid"} ```