forked from ebhomengo/niki
18 lines
660 B
Go
18 lines
660 B
Go
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")
|
|
|
|
r.Use(middleware.Auth(h.authSvc))
|
|
|
|
r.GET("/:id", h.Get, middleware.AdminAuthorization(h.adminAuthorizeSvc, entity.AdminKindBoxGetAwaitingReturnPermission))
|
|
r.GET("", h.GetAll, middleware.AdminAuthorization(h.adminAuthorizeSvc, entity.AdminKindBoxGetAwaitingReturnPermission))
|
|
r.PATCH("/:id/return", h.Return, middleware.AdminAuthorization(h.adminAuthorizeSvc, entity.AdminKindBoxReturnPermission))
|
|
}
|