forked from ebhomengo/niki
17 lines
469 B
Go
17 lines
469 B
Go
package benefactorhandler
|
|
|
|
import (
|
|
"git.gocasts.ir/ebhomengo/niki/delivery/http_server/middleware"
|
|
"git.gocasts.ir/ebhomengo/niki/entity"
|
|
"github.com/labstack/echo/v4"
|
|
)
|
|
|
|
func (h Handler) SetRoutes(e *echo.Echo) {
|
|
r := e.Group("/benefactor")
|
|
|
|
r.POST("/send-otp", h.SendOtp)
|
|
r.POST("/login-register", h.loginOrRegister)
|
|
r.POST("/address", h.AddAddress, middleware.Auth(h.authSvc, h.authConfig),
|
|
middleware.BenefactorAuthorization(entity.UserBenefactorRole))
|
|
}
|