Commit 76c41055 authored by Willard's avatar Willard

Fix error where create stall review expects form

parent e6130890
......@@ -226,9 +226,9 @@ def stall_favorite_post(stall_id):
@auth.login_required
def create_stall_review(stall_id):
user_id = g.user.id
title = request.form['title']
body = request.form['body']
rating = float(request.form['rating'])
title = request.json['title']
body = request.json['body']
rating = float(request.json['rating'])
review = StallReview(title, body, rating, user_id, stall_id)
db.session.add(review)
db.session.commit()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment