Send 404 if quest/side_quest not found

This commit is contained in:
Ceda EI 2019-03-14 20:12:24 +05:30
parent 28c33ee976
commit 4609711624
1 changed files with 6 additions and 0 deletions

View File

@ -207,6 +207,9 @@ def update_quest(db):
return jsonify(errors._400), 400
quest = questable.get_quest(db, player.CHAT_ID, qid)
if quest is False:
return jsonify(errors._404), 404
if quest.state == 1:
return jsonify(dictify_quest(quest))
@ -261,6 +264,9 @@ def update_side_quest(db):
return jsonify(errors._400), 400
quest = questable.get_side_quest(db, player.CHAT_ID, qid)
if quest is False:
return jsonify(errors._404), 404
if quest.state == 1:
return jsonify(dictify_quest(quest))