forked from ebhomengo/niki
feat(niki): add return awaiting kindbox permission and route (#81)
This commit is contained in:
parent
ab21d63854
commit
54abeb48fa
|
@ -14,4 +14,5 @@ func (h Handler) SetRoutes(e *echo.Echo) {
|
||||||
r.GET("/:id", h.Get, middleware.AdminAuthorization(h.adminAuthorizeSvc, entity.AdminKindBoxGetPermission))
|
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.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("", h.GetAll, middleware.AdminAuthorization(h.adminAuthorizeSvc, entity.AdminKindBoxGetAllPermission))
|
||||||
|
r.GET("/awaiting-return/:id", h.GetAwaitingReturn, middleware.AdminAuthorization(h.adminAuthorizeSvc, entity.AdminKindBoxGetAwaitingReturnPermission))
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,4 +16,5 @@ const (
|
||||||
AdminKindBoxAssignReceiverAgentPermission = AdminPermission("kindbox-assign_receiver_agent")
|
AdminKindBoxAssignReceiverAgentPermission = AdminPermission("kindbox-assign_receiver_agent")
|
||||||
AdminKindBoxGetAllPermission = AdminPermission("kindbox-getall")
|
AdminKindBoxGetAllPermission = AdminPermission("kindbox-getall")
|
||||||
AdminKindBoxReqUpdatePermission = AdminPermission("kindboxreq-update")
|
AdminKindBoxReqUpdatePermission = AdminPermission("kindboxreq-update")
|
||||||
|
AdminKindBoxGetAwaitingReturnPermission = AdminPermission("kindbox-get_awaiting_return")
|
||||||
)
|
)
|
||||||
|
|
|
@ -13,7 +13,8 @@ ALTER TABLE `admin_access_controls` MODIFY COLUMN `permission`
|
||||||
'kindboxreq-add',
|
'kindboxreq-add',
|
||||||
'kindbox-assign_receiver_agent',
|
'kindbox-assign_receiver_agent',
|
||||||
'kindbox-getall',
|
'kindbox-getall',
|
||||||
'kindboxreq-update'
|
'kindboxreq-update',
|
||||||
|
'kindbox-get_awaiting_return'
|
||||||
) NOT NULL;
|
) NOT NULL;
|
||||||
|
|
||||||
-- +migrate Down
|
-- +migrate Down
|
Loading…
Reference in New Issue