blob: b23003f1de2a2459e401d5551551ee0adf952214 (
plain) (
tree)
|
|
package user
import (
"github.com/labstack/echo/v4"
"neonxp.ru/go/framework/pkg/service/user"
)
type Handler struct {
user *user.Service
}
// NewHandler returns new Handler.
func NewHandler(u *user.Service) *Handler {
return &Handler{user: u}
}
func (h *Handler) Register(g *echo.Group) {
g.GET("/login", h.LoginForm)
g.POST("/login", h.LoginForm)
g.GET("/register", h.RegisterForm)
g.POST("/register", h.RegisterForm)
g.GET("/profile", h.Profile)
g.POST("/logout", h.Logout)
}
|