features/client-side-settings #3
@ -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)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user