casbin.js 1018 B

1234567891011121314151617181920212223242526272829303132333435
  1. import service from '@/utils/request'
  2. // @Tags authority
  3. // @Summary 更改角色api权限
  4. // @Security ApiKeyAuth
  5. // @accept application/json
  6. // @Produce application/json
  7. // @Param data body api.CreateAuthorityPatams true "更改角色api权限"
  8. // @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}"
  9. // @Router /casbin/UpdateCasbin [post]
  10. export const UpdateCasbin = (data) => {
  11. return service({
  12. url: "/casbin/UpdateCasbin",
  13. method: 'post',
  14. data
  15. })
  16. }
  17. // @Tags casbin
  18. // @Summary 获取权限列表
  19. // @Security ApiKeyAuth
  20. // @accept application/json
  21. // @Produce application/json
  22. // @Param data body api.CreateAuthorityPatams true "获取权限列表"
  23. // @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}"
  24. // @Router /casbin/getPolicyPathByAuthorityId [post]
  25. export const getPolicyPathByAuthorityId = (data) => {
  26. return service({
  27. url: "/casbin/getPolicyPathByAuthorityId",
  28. method: 'post',
  29. data
  30. })
  31. }