Skip to content

Commit

Permalink
🔒️ Add status code
Browse files Browse the repository at this point in the history
  • Loading branch information
lleans committed Dec 2, 2023
1 parent b463669 commit e204baa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions router.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ async def search():
'data': ''
})

return jsonify(response)
return jsonify(response), response.get('status', 500)


@app.route('/track', methods=['GET'])
Expand Down Expand Up @@ -117,7 +117,7 @@ async def track():
'data': ''
})

return jsonify(response)
return jsonify(response), response.get('status', 500)


@app.route('/lyric', methods=['GET'])
Expand Down Expand Up @@ -168,7 +168,7 @@ async def lyric():
'data': ''
})

return jsonify(response)
return jsonify(response), response.get('status', 500)


@app.route('/translation', methods=['GET'])
Expand Down Expand Up @@ -220,7 +220,7 @@ async def translation():
'data': ''
})

return jsonify(response)
return jsonify(response), response.get('status', 500)


@app.errorhandler(400)
Expand Down

0 comments on commit e204baa

Please sign in to comment.