Refactor session code

This commit is contained in:
2024-05-05 14:50:51 +07:00
parent 19856c328d
commit dce11e3569
5 changed files with 18 additions and 35 deletions

View File

@ -58,7 +58,7 @@ func POST(w http.ResponseWriter, r *http.Request) {
}
if email == userData.Email && utils.CheckPasswordHash(password, userData.Password) {
storeSession := session.GlobalSessionStore.Create()
storeSession := session.Create()
storeSession.Values["user"] = types.User{
UserID: userData.UserID,
Email: email,