Skip to content

Commit

Permalink
kartik does not know what 403 means
Browse files Browse the repository at this point in the history
  • Loading branch information
Ajay Raj committed Jan 28, 2019
1 parent 9800b3e commit ffe98d3
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,12 +402,12 @@ def delete_lecture(course_ok_id, lecture_url_name, ok_id=None):
).sort("date", 1)
if request.args["piazza_active"] == "active":
Piazza.delete_post(
piazza_course_id=request.form["piazza_course_id"],
cid=request.form["post_id"])
piazza_course_id=request.args["piazza_course_id"],
cid=request.args["lecture_piazza_id"])
Piazza.recreate_master_post(
request.form["piazza_master_post_id"],
piazza_course_id=request.form[
"piazza_course_id"], db=db)
request.args["piazza_master_post_id"],
piazza_course_id=request.args["piazza_course_id"],
db=db)
return jsonify(success=True), 200
return jsonify(success=False,
message="Can only delete a lecture on Hermes for an OK course you are a part of"), 403
Expand Down Expand Up @@ -638,10 +638,10 @@ def ask_piazza_question(course_ok_id, lecture_url_name, video_index,
pass
except Exception as e:
return jsonify(success=False,
message="Piazza Post is not active, please tell an instructor to a. recreate the post on Hermes or b. Delete this lecture"), 403
message="Piazza Post is not active, please tell an instructor to a. recreate the post on Hermes or b. Delete this lecture"), 400
return jsonify(success=True), 200
return jsonify(success=False,
message="Please enter a question"), 403
message="Please enter a question"), 400
return jsonify(success=False,
message="Can only create ask a question for an OK course you are a part of"), 403

Expand Down Expand Up @@ -849,7 +849,7 @@ def create_resource(course_ok_id, lecture_url_name, video_index, ok_id=None):
video_index = video_index,
db = db,
resource_data = request.form.to_dict()

)
return jsonify(success=True), 200
except ValueError as e:
Expand Down

0 comments on commit ffe98d3

Please sign in to comment.