forked from ebhomengo/niki
1
0
Fork 0
niki/delivery/http_server/benefactor/kind_box/route.go

21 lines
480 B
Go
Raw Permalink Normal View History

package benefactorkindboxhandler
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("/benefactors/kindboxes")
r.Use(
middleware.Auth(h.authSvc),
middleware.BenefactorAuthorization(entity.UserBenefactorRole),
)
r.GET("/:id", h.Get)
r.GET("", h.GetAll)
r.PATCH("/:id/emptying-requests", h.RegisterEmptyingRequest)
}