Commit 8bd5d86360e87dc18e9d79caa982594eff688459
Fix correct way of handling query string arguments
| | | | 191 | reponse.status_code = 400 | 191 | reponse.status_code = 400 |
---|
192 | return response | 192 | return response |
---|
193 | | 193 | |
---|
194 | res = g.collection.find(args) | | res = g.collection.find(args) |
---|
| | 194 | params = {} | | | 195 | |
---|
| | 196 | params['where'] = args.get('where') |
---|
| | 197 | if args.get('who'): |
---|
| | 198 | params['who'] = args.get('who') |
---|
| | 199 | if args.get('what'): |
---|
| | 200 | params['what'] = args.get('what') |
---|
| | 201 | if args.get('how'): |
---|
| | 202 | params['how'] = args.get('how') |
---|
| | 203 | |
---|
| | 204 | res = g.collection.find(params) |
---|
195 | | 205 | |
---|
196 | if res.count() < 1: | 206 | if res.count() < 1: |
---|
197 | response.status_code = 404 | 207 | response.status_code = 404 |
---|