Commit c4714ffacc5477a510e6cb67bcc18e2cb9b89c2f

Small change in the /sweets/q API
  • Diff rendering mode:
  • inline
  • side by side

swtr.py

187 reponse.status_code = 400187 reponse.status_code = 400
188 return response188 return response
189189
190 if args['where'] is None:
191 reponse.status_code = 400
192 return response
193
194 params = {}190 params = {}
195191
196 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'):
202202
203 if res.count() < 1:203 if res.count() < 1:
204 response.status_code = 404204 response.status_code = 404
205 response.data = 'Not Found'
205 return response206 return response
206207
207 swt_list = []208 swt_list = []