Change expired session token error to be 401

This commit is contained in:
Kevin Chung
2020-06-06 23:50:55 -04:00
parent 9e39d18e52
commit b2bf4eb542

View File

@@ -24,7 +24,7 @@ def get_current_user():
if session_hash != hmac(user.password):
logout_user()
if request.content_type == "application/json":
error = 403
error = 401
else:
error = redirect(url_for("auth.login", next=request.full_path))
abort(error)