Skip to content

Instantly share code, notes, and snippets.

@ahmedbesbes
Created January 20, 2020 14:03
Show Gist options
  • Select an option

  • Save ahmedbesbes/ee69ae148b123665abb820805ba89dca to your computer and use it in GitHub Desktop.

Select an option

Save ahmedbesbes/ee69ae148b123665abb820805ba89dca to your computer and use it in GitHub Desktop.
@api.route('/reviews', methods=['GET'])
def get_reviews():
'''
Get all reviews.
'''
if request.method == 'GET':
query = db.Review.select()
return jsonify([r.serialize() for r in query])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment