blob: 4844ede2c63e1d45fd39090a932c30ac12b8e85c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
package user
import (
"net/http"
"github.com/labstack/echo/v4"
"neonxp.ru/go/framework/pkg/utils"
)
func (*Handler) Logout(c echo.Context) error {
if err := utils.SetUser(c, nil, -1); err != nil {
return err
}
utils.HTMXRedirect(c, "/")
return c.NoContent(http.StatusNoContent)
}
|