forked from ebhomengo/niki
23 lines
500 B
Go
23 lines
500 B
Go
package benefactorkindboxreqhandler
|
|
|
|
import (
|
|
"git.gocasts.ir/ebhomengo/niki/delivery/http_server/middleware"
|
|
"git.gocasts.ir/ebhomengo/niki/entity"
|
|
echo "github.com/labstack/echo/v4"
|
|
)
|
|
|
|
func (h Handler) SetRoutes(e *echo.Echo) {
|
|
r := e.Group("/benefactors/kindboxreqs")
|
|
|
|
r.Use(
|
|
middleware.Auth(h.authSvc),
|
|
middleware.BenefactorAuthorization(entity.UserBenefactorRole),
|
|
)
|
|
|
|
r.POST("", h.Add)
|
|
r.GET("/:id", h.Get)
|
|
r.DELETE("/:id", h.Delete)
|
|
r.GET("", h.GetAll)
|
|
r.PUT("/:id", h.Update)
|
|
}
|