Skip to content
This repository was archived by the owner on Dec 8, 2022. It is now read-only.

Commit c988ea5

Browse files
authored
Merge pull request #40 from codewizardshq/final-check-only
/api/v1/questions/final - allow only checking final answer
2 parents 8db1724 + 3d8c9dc commit c988ea5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

CodeChallenge/api/questions.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,10 @@ def answer_eval():
228228

229229
correct = str_cmp(eval_output, q.answer)
230230

231+
if request.json.get("checkOnly", False):
232+
return jsonify(correct=correct,
233+
status="success")
234+
231235
ans = Answer.query.filter_by(user_id=user.id, question_id=q.id).first()
232236

233237
if ans is None:

0 commit comments

Comments
 (0)