Skip to content

Commit

Permalink
added example json for search input/output
Browse files Browse the repository at this point in the history
  • Loading branch information
hkethi002 committed Jan 15, 2018
1 parent 1f6b8c4 commit 2253541
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 1 addition & 3 deletions api/dao/containerstorage.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,10 +441,8 @@ def __init__(self):
super(SearchStorage, self).__init__('savesearches', use_object_id=True)

def create_el(self, payload):
log.debug(payload)
payload = self._to_mongo(payload)
try:
result = self.dbc.insert_one(payload, bypass_document_validation=True)
result = self.dbc.insert_one(payload)
except pymongo.errors.DuplicateKeyError:
raise APIConflictException('Object with id {} already exists.'.format(payload['_id']))
return result
Expand Down
7 changes: 7 additions & 0 deletions raml/examples/input/search-input.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"search": {
"return_type": "file",
"filters": [{"terms": {"file.type":["nifti"]}}]
},
"label" : "Test Search"
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
},
"permissions": [{"access": "admin", "_id": "[email protected]"}],
"creator": "[email protected]"
}
}

0 comments on commit 2253541

Please sign in to comment.