Skip to content

Commit 2253541

Browse files
committed
added example json for search input/output
1 parent 1f6b8c4 commit 2253541

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

api/dao/containerstorage.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -441,10 +441,8 @@ def __init__(self):
441441
super(SearchStorage, self).__init__('savesearches', use_object_id=True)
442442

443443
def create_el(self, payload):
444-
log.debug(payload)
445-
payload = self._to_mongo(payload)
446444
try:
447-
result = self.dbc.insert_one(payload, bypass_document_validation=True)
445+
result = self.dbc.insert_one(payload)
448446
except pymongo.errors.DuplicateKeyError:
449447
raise APIConflictException('Object with id {} already exists.'.format(payload['_id']))
450448
return result

raml/examples/input/search-input.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"search": {
3+
"return_type": "file",
4+
"filters": [{"terms": {"file.type":["nifti"]}}]
5+
},
6+
"label" : "Test Search"
7+
}

raml/examples/output/search.json renamed to raml/examples/output/search-output.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
},
88
"permissions": [{"access": "admin", "_id": "[email protected]"}],
99
"creator": "[email protected]"
10-
}
10+
}

0 commit comments

Comments
 (0)