2024-01-02 14:04:16 +00:00
|
|
|
package benefactorkindboxreqhandler
|
|
|
|
|
|
|
|
import (
|
2024-01-16 16:13:06 +00:00
|
|
|
"git.gocasts.ir/ebhomengo/niki/delivery/http_server/middleware"
|
2024-01-17 07:46:57 +00:00
|
|
|
"git.gocasts.ir/ebhomengo/niki/entity"
|
2024-01-02 15:35:26 +00:00
|
|
|
echo "github.com/labstack/echo/v4"
|
2024-01-02 14:04:16 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func (h Handler) SetRoutes(e *echo.Echo) {
|
2024-08-27 17:49:34 +00:00
|
|
|
r := e.Group("/benefactors/kindboxreqs")
|
2024-01-02 14:04:16 +00:00
|
|
|
|
2024-04-26 21:37:01 +00:00
|
|
|
r.Use(
|
2024-08-01 10:20:18 +00:00
|
|
|
middleware.Auth(h.authSvc),
|
2024-04-26 21:37:01 +00:00
|
|
|
middleware.BenefactorAuthorization(entity.UserBenefactorRole),
|
|
|
|
)
|
2024-02-19 13:45:55 +00:00
|
|
|
|
2024-08-27 17:49:34 +00:00
|
|
|
r.POST("", h.Add)
|
2024-02-19 13:45:55 +00:00
|
|
|
r.GET("/:id", h.Get)
|
2024-05-31 14:49:04 +00:00
|
|
|
r.DELETE("/:id", h.Delete)
|
2024-08-27 17:49:34 +00:00
|
|
|
r.GET("", h.GetAll)
|
2024-07-23 19:21:02 +00:00
|
|
|
r.PUT("/:id", h.Update)
|
2024-01-02 14:04:16 +00:00
|
|
|
}
|