2024-01-02 14:04:16 +00:00
|
|
|
package adminkindboxreqhandler
|
|
|
|
|
|
|
|
import (
|
2024-02-03 04:56:27 +00:00
|
|
|
"git.gocasts.ir/ebhomengo/niki/delivery/http_server/middleware"
|
2024-02-24 17:06:13 +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) {
|
|
|
|
r := e.Group("/admin/kindboxreqs")
|
|
|
|
|
2024-01-23 07:39:58 +00:00
|
|
|
// todo - add acl
|
2024-02-24 17:06:13 +00:00
|
|
|
r.PATCH("/accept-kind-box-req/:id", h.Accept, middleware.Auth(h.authSvc, h.authConfig), middleware.AdminAuthorization(h.adminAuthorizeSvc, entity.AdminKindBoxReqAcceptPermission))
|
|
|
|
r.PATCH("/reject-kind-box-req/:id", h.Reject, middleware.Auth(h.authSvc, h.authConfig), middleware.AdminAuthorization(h.adminAuthorizeSvc, entity.AdminKindBoxReqRejectPermission))
|
2024-03-14 13:38:42 +00:00
|
|
|
r.PATCH("/deliver-kind-box-req/:id", h.Deliver)
|
2024-02-20 20:34:51 +00:00
|
|
|
r.PATCH("/assign-sender-agent/:id", h.AssignSenderAgent)
|
2024-02-24 17:06:13 +00:00
|
|
|
r.GET("/", h.GetAll, middleware.Auth(h.authSvc, h.authConfig), middleware.AdminAuthorization(h.adminAuthorizeSvc, entity.AdminKindBoxReqGetAllPermission))
|
2024-01-02 14:04:16 +00:00
|
|
|
}
|