lishwist/http/routing/logout.go

16 lines
275 B
Go

package routing
import (
"lishwist/http/response"
"net/http"
)
func LogoutPost(h http.Header, r *response.Request) response.Response {
session := r.GetSession()
session.Options().MaxAge = 0
session.ClearValues()
return response.SeeOther("/").SaveSession(session)
}