package adminkindboxhandler 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("/admins/kindboxes") r.Use(middleware.Auth(h.authSvc)) r.GET("/:id", h.Get, middleware.AdminAuthorization(h.adminAuthorizeSvc, entity.AdminKindBoxGetPermission)) r.PATCH("/:id/assign-receiver-agent", h.AssignReceiverAgent, middleware.AdminAuthorization(h.adminAuthorizeSvc, entity.AdminKindBoxAssignReceiverAgentPermission)) r.GET("", h.GetAll, middleware.AdminAuthorization(h.adminAuthorizeSvc, entity.AdminKindBoxGetAllPermission)) r.PATCH("/:id/enumerate", h.Enumerate, middleware.AdminAuthorization(h.adminAuthorizeSvc, entity.AdminKindBoxEnumeratePermission)) r.PUT("/update/:id", h.Update, middleware.AdminAuthorization(h.adminAuthorizeSvc, entity.AdminKindBoxUpdatePermission)) }