17 lines
336 B
Go
17 lines
336 B
Go
|
package user
|
||
|
|
||
|
import (
|
||
|
"github.com/labstack/echo/v4"
|
||
|
"go.neonxp.ru/framework/pkg/tpl"
|
||
|
"go.neonxp.ru/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())
|
||
|
}
|