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) {
|
2024-07-21 13:10:22 +00:00
|
|
|
r := e.Group("/admins/kindboxreqs")
|
2024-01-02 14:04:16 +00:00
|
|
|
|
2024-05-18 14:45:29 +00:00
|
|
|
r.Use(middleware.Auth(h.authSvc, h.authConfig))
|
2024-06-14 08:41:36 +00:00
|
|
|
r.POST("", h.AddKindBoxReq, middleware.AdminAuthorization(h.adminAuthorizeSvc, entity.AdminKindBoxReqAddPermission))
|
2024-05-18 14:45:29 +00:00
|
|
|
r.PATCH("/accept-kind-box-req/:id", h.Accept, middleware.AdminAuthorization(h.adminAuthorizeSvc, entity.AdminKindBoxReqAcceptPermission))
|
|
|
|
r.PATCH("/reject-kind-box-req/:id", h.Reject, middleware.AdminAuthorization(h.adminAuthorizeSvc, entity.AdminKindBoxReqRejectPermission))
|
|
|
|
r.PATCH("/deliver-kind-box-req/:id", h.Deliver, middleware.AdminAuthorization(h.adminAuthorizeSvc, entity.AdminKindBoxReqDeliverPermission))
|
|
|
|
r.PATCH("/assign-sender-agent/:id", h.AssignSenderAgent, middleware.AdminAuthorization(h.adminAuthorizeSvc, entity.AdminKindBoxReqAssignSenderAgentPermission))
|
|
|
|
r.GET("", h.GetAll, middleware.AdminAuthorization(h.adminAuthorizeSvc, entity.AdminKindBoxReqGetAllPermission))
|
2024-06-10 22:54:16 +00:00
|
|
|
r.GET("/awaiting-delivery/:id", h.GetAwaitingDelivery, middleware.AdminAuthorization(h.adminAuthorizeSvc, entity.AdminKindBoxReqGetAwaitingDeliveryPermission))
|
2024-06-12 08:15:28 +00:00
|
|
|
r.GET("/awaiting-delivery", h.GetAllAwaitingDelivery, middleware.AdminAuthorization(h.adminAuthorizeSvc, entity.AdminKindBoxReqGetAwaitingDeliveryPermission))
|
2024-07-09 14:45:50 +00:00
|
|
|
r.PUT("/:id", h.Update, middleware.AdminAuthorization(h.adminAuthorizeSvc, entity.AdminKindBoxReqUpdatePermission))
|
2024-07-21 14:16:01 +00:00
|
|
|
r.GET("/:id", h.Get, middleware.AdminAuthorization(h.adminAuthorizeSvc, entity.AdminKindBoxReqGetPermission))
|
|
|
|
|
2024-01-02 14:04:16 +00:00
|
|
|
}
|