Commit c4714ffacc5477a510e6cb67bcc18e2cb9b89c2f
Small change in the /sweets/q API
| | | | 187 | reponse.status_code = 400 | 187 | reponse.status_code = 400 |
---|
188 | return response | 188 | return response |
---|
189 | | 189 | |
---|
190 | if args['where'] is None: | | if args['where'] is None: |
---|
191 | reponse.status_code = 400 | | reponse.status_code = 400 |
---|
192 | return response | | return response |
---|
193 | | | |
---|
194 | params = {} | 190 | params = {} |
---|
195 | | 191 | |
---|
196 | params['where'] = args.get('where') | | params['where'] = args.get('where') |
---|
197 | if args.get('who'): | 192 | if args.get('who'): |
---|
198 | params['who'] = args.get('who') | 193 | params['who'] = args.get('who') |
---|
| | 194 | if args.get('where'): |
---|
| | 195 | params['where'] = args.get('where') |
---|
199 | if args.get('what'): | 196 | if args.get('what'): |
---|
200 | params['what'] = args.get('what') | 197 | params['what'] = args.get('what') |
---|
201 | if args.get('how'): | 198 | if args.get('how'): |
---|
… | | … | |
---|
202 | | 202 | |
---|
203 | if res.count() < 1: | 203 | if res.count() < 1: |
---|
204 | response.status_code = 404 | 204 | response.status_code = 404 |
---|
| | 205 | response.data = 'Not Found' |
---|
205 | return response | 206 | return response |
---|
206 | | 207 | |
---|
207 | swt_list = [] | 208 | swt_list = [] |
---|