Send 404 if quest/side_quest not found
This commit is contained in:
parent
28c33ee976
commit
4609711624
|
@ -207,6 +207,9 @@ def update_quest(db):
|
||||||
return jsonify(errors._400), 400
|
return jsonify(errors._400), 400
|
||||||
quest = questable.get_quest(db, player.CHAT_ID, qid)
|
quest = questable.get_quest(db, player.CHAT_ID, qid)
|
||||||
|
|
||||||
|
if quest is False:
|
||||||
|
return jsonify(errors._404), 404
|
||||||
|
|
||||||
if quest.state == 1:
|
if quest.state == 1:
|
||||||
return jsonify(dictify_quest(quest))
|
return jsonify(dictify_quest(quest))
|
||||||
|
|
||||||
|
@ -261,6 +264,9 @@ def update_side_quest(db):
|
||||||
return jsonify(errors._400), 400
|
return jsonify(errors._400), 400
|
||||||
quest = questable.get_side_quest(db, player.CHAT_ID, qid)
|
quest = questable.get_side_quest(db, player.CHAT_ID, qid)
|
||||||
|
|
||||||
|
if quest is False:
|
||||||
|
return jsonify(errors._404), 404
|
||||||
|
|
||||||
if quest.state == 1:
|
if quest.state == 1:
|
||||||
return jsonify(dictify_quest(quest))
|
return jsonify(dictify_quest(quest))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue