Optimize session retrieval and fix Docker timezone issue

This commit is contained in:
2024-05-02 21:02:50 +07:00
parent 4715814551
commit bb2540a5c4
4 changed files with 41 additions and 26 deletions

View File

@ -17,7 +17,7 @@ func init() {
func GET(w http.ResponseWriter, r *http.Request) {
userSession := r.Context().Value("user").(types.User)
component := userView.Main("User Page", userSession.Email, userSession.Username, session.UserSessionInfoList[userSession.Email])
component := userView.Main("User Page", userSession.Email, userSession.Username, session.GetSessions(userSession.Email))
err := component.Render(r.Context(), w)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)