2024-07-13 12:33:07 +00:00
|
|
|
package agentkindboxhandler
|
|
|
|
|
|
|
|
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("/agents/kindboxes")
|
|
|
|
|
2024-08-01 10:20:18 +00:00
|
|
|
r.Use(middleware.Auth(h.authSvc))
|
2024-07-13 12:33:07 +00:00
|
|
|
|
|
|
|
r.GET("/:id", h.Get, middleware.AdminAuthorization(h.adminAuthorizeSvc, entity.AdminKindBoxGetAwaitingReturnPermission))
|
2024-07-14 08:58:37 +00:00
|
|
|
r.GET("", h.GetAll, middleware.AdminAuthorization(h.adminAuthorizeSvc, entity.AdminKindBoxGetAwaitingReturnPermission))
|
2024-08-27 17:49:34 +00:00
|
|
|
r.PATCH("/:id/return", h.Return, middleware.AdminAuthorization(h.adminAuthorizeSvc, entity.AdminKindBoxReturnPermission))
|
2024-07-13 12:33:07 +00:00
|
|
|
}
|