feat(niki): add return awaiting kindbox permission and route (#81)

This commit is contained in:
Ruhollah 2024-07-13 17:17:54 +03:30
parent ab21d63854
commit 54abeb48fa
3 changed files with 4 additions and 1 deletions

View File

@ -14,4 +14,5 @@ func (h Handler) SetRoutes(e *echo.Echo) {
r.GET("/:id", h.Get, middleware.AdminAuthorization(h.adminAuthorizeSvc, entity.AdminKindBoxGetPermission))
r.PATCH("/assign-receiver-agent/:id", h.AssignReceiverAgent, middleware.AdminAuthorization(h.adminAuthorizeSvc, entity.AdminKindBoxAssignReceiverAgentPermission))
r.GET("", h.GetAll, middleware.AdminAuthorization(h.adminAuthorizeSvc, entity.AdminKindBoxGetAllPermission))
r.GET("/awaiting-return/:id", h.GetAwaitingReturn, middleware.AdminAuthorization(h.adminAuthorizeSvc, entity.AdminKindBoxGetAwaitingReturnPermission))
}

View File

@ -16,4 +16,5 @@ const (
AdminKindBoxAssignReceiverAgentPermission = AdminPermission("kindbox-assign_receiver_agent")
AdminKindBoxGetAllPermission = AdminPermission("kindbox-getall")
AdminKindBoxReqUpdatePermission = AdminPermission("kindboxreq-update")
AdminKindBoxGetAwaitingReturnPermission = AdminPermission("kindbox-get_awaiting_return")
)

View File

@ -13,7 +13,8 @@ ALTER TABLE `admin_access_controls` MODIFY COLUMN `permission`
'kindboxreq-add',
'kindbox-assign_receiver_agent',
'kindbox-getall',
'kindboxreq-update'
'kindboxreq-update',
'kindbox-get_awaiting_return'
) NOT NULL;
-- +migrate Down