UpdateRole 更新角色信息
(ctx context.Context, role *domain.Role)
| 61 | |
| 62 | // UpdateRole 更新角色信息 |
| 63 | func (r *roleService) UpdateRole(ctx context.Context, role *domain.Role) error { |
| 64 | if role == nil { |
| 65 | r.l.Warn("角色不能为空") |
| 66 | return ErrInvalidRole |
| 67 | } |
| 68 | |
| 69 | return r.repo.UpdateRole(ctx, role) |
| 70 | } |
| 71 | |
| 72 | // DeleteRole 删除角色及其相关权限 |
| 73 | func (r *roleService) DeleteRole(ctx context.Context, id int) error { |
nothing calls this directly
no test coverage detected