aboutsummaryrefslogblamecommitdiff
path: root/pkg/handler/user/profile.go
blob: ab8457b832d1acad846b76f765533e4ad6fcd76d (plain) (tree)
1
2
3
4
5
6



                                     

                                          









                                                                         
package user

import (
	"github.com/labstack/echo/v4"
	"neonxp.ru/go/framework/pkg/tpl"
	"neonxp.ru/go/framework/pkg/utils"
)

func (*Handler) Profile(c echo.Context) error {
	u := utils.GetUserCtx(c.Request().Context())
	if u == nil {
		return echo.ErrForbidden
	}

	return tpl.Profile(u).Render(c.Request().Context(), c.Response())
}