features/client-side-settings #3

Merged
jtom38 merged 12 commits from features/client-side-settings into main 2024-04-14 19:40:30 -07:00
Showing only changes of commit f9c7032e92 - Show all commits

View File

@ -3,6 +3,7 @@ package handlers
import ( import (
"log" "log"
"net/http" "net/http"
"templ-test/domain"
"templ-test/views/auth" "templ-test/views/auth"
"templ-test/views/home" "templ-test/views/home"
@ -25,17 +26,17 @@ func (h *Handlers) AuthLoginPost(c echo.Context) error {
} }
cookie := new(http.Cookie) cookie := new(http.Cookie)
cookie.Name = CookieToken cookie.Name = domain.CookieToken
cookie.Value = resp.Token cookie.Value = resp.Token
c.SetCookie(cookie) c.SetCookie(cookie)
cookie = new(http.Cookie) cookie = new(http.Cookie)
cookie.Name = CookieRefreshToken cookie.Name = domain.CookieRefreshToken
cookie.Value = resp.RefreshToken cookie.Value = resp.RefreshToken
c.SetCookie(cookie) c.SetCookie(cookie)
cookie = new(http.Cookie) cookie = new(http.Cookie)
cookie.Name = CookieUser cookie.Name = domain.CookieUser
cookie.Value = user cookie.Value = user
c.SetCookie(cookie) c.SetCookie(cookie)