Fix /get_quest, /get_side_quest
This commit is contained in:
parent
cf05499e43
commit
4d610c5bff
|
@ -96,9 +96,8 @@ def get_quest(db):
|
||||||
except(KeyError):
|
except(KeyError):
|
||||||
return jsonify(errors._400), 400
|
return jsonify(errors._400), 400
|
||||||
|
|
||||||
try:
|
|
||||||
quest = player.get_quest(qid)
|
quest = player.get_quest(qid)
|
||||||
except Exception:
|
if quest is False:
|
||||||
return jsonify(errors._404), 404
|
return jsonify(errors._404), 404
|
||||||
|
|
||||||
return jsonify(dictify_quest(quest))
|
return jsonify(dictify_quest(quest))
|
||||||
|
@ -120,9 +119,7 @@ def get_side_quest(db):
|
||||||
|
|
||||||
side_quest = player.get_side_quest(qid)
|
side_quest = player.get_side_quest(qid)
|
||||||
|
|
||||||
try:
|
if side_quest is False:
|
||||||
side_quest = player.get_quest(qid)
|
|
||||||
except Exception:
|
|
||||||
return jsonify(errors._404), 404
|
return jsonify(errors._404), 404
|
||||||
|
|
||||||
return jsonify(dictify_quest(side_quest))
|
return jsonify(dictify_quest(side_quest))
|
||||||
|
|
Loading…
Reference in New Issue