Commit 689a395c authored by impfundev's avatar impfundev

fix: redirect authorize librarian to dashboard from auth route

parent ed24843a
......@@ -34,8 +34,12 @@ class AuthMiddleware(MiddlewareMixin):
}
message = "login request success, user: " + f"{user_obj}"
print(message)
return response
else:
return HttpResponseRedirect("/auth/login")
return response
if auth_session is not None and request.path.startswith("/auth/"):
return HttpResponseRedirect("/dashboard/")
else:
return response
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment