MCPcopy Create free account
hub / github.com/GoSimplicity/LinkMe / UpdateRole

Method UpdateRole

internal/service/role.go:63–70  ·  view source on GitHub ↗

UpdateRole 更新角色信息

(ctx context.Context, role *domain.Role)

Source from the content-addressed store, hash-verified

61
62// UpdateRole 更新角色信息
63func (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 删除角色及其相关权限
73func (r *roleService) DeleteRole(ctx context.Context, id int) error {

Callers

nothing calls this directly

Calls 1

UpdateRoleMethod · 0.65

Tested by

no test coverage detected