migrated out cookies module

This commit is contained in:
2026-01-02 18:37:01 +11:00
parent 8f6b4b0026
commit 6dd80ee7b6
12 changed files with 73 additions and 221 deletions

View File

@@ -10,8 +10,8 @@ import (
"projectreshoot/internal/view/component/form"
"projectreshoot/internal/view/page"
"projectreshoot/pkg/config"
"projectreshoot/pkg/cookies"
"git.haelnorr.com/h/golib/cookies"
"git.haelnorr.com/h/golib/hlog"
"git.haelnorr.com/h/golib/jwt"
"github.com/pkg/errors"
@@ -82,7 +82,7 @@ func LoginRequest(
}
rememberMe := checkRememberMe(r)
err = cookies.SetTokenCookies(w, r, config, tokenGen, user, true, rememberMe)
err = jwt.SetTokenCookies(w, r, tokenGen, user.ID, true, rememberMe, config.SSL)
if err != nil {
tx.Rollback()
w.WriteHeader(http.StatusInternalServerError)