refactor(role): Comment out role name existence check in CreateRole function
Deploy Application / deploy (push) Successful in 23s
Details
Deploy Application / deploy (push) Successful in 23s
Details
This commit is contained in:
parent
f1a5395d68
commit
bc932901f7
|
|
@ -212,13 +212,13 @@ func (r *roleService) AssignRolesToUser(ctx context.Context, userId string, role
|
||||||
|
|
||||||
// CreateRole implements RoleService.
|
// CreateRole implements RoleService.
|
||||||
func (r *roleService) CreateRole(ctx context.Context, req dto.RoleCreateRequest) (dto.RoleResponse, error) {
|
func (r *roleService) CreateRole(ctx context.Context, req dto.RoleCreateRequest) (dto.RoleResponse, error) {
|
||||||
_, exists, err := r.roleRepo.CheckRoleName(ctx, r.db, req.Name)
|
// _, exists, err := r.roleRepo.CheckRoleName(ctx, r.db, req.Name)
|
||||||
if err != nil && err != gorm.ErrRecordNotFound {
|
// if err != nil && err != gorm.ErrRecordNotFound {
|
||||||
return dto.RoleResponse{}, err
|
// return dto.RoleResponse{}, err
|
||||||
}
|
// }
|
||||||
if exists {
|
// if exists {
|
||||||
return dto.RoleResponse{}, dto.ErrRoleAlreadyExists
|
// return dto.RoleResponse{}, dto.ErrRoleAlreadyExists
|
||||||
}
|
// }
|
||||||
|
|
||||||
clientUUID, err := uuid.Parse(req.ClientID)
|
clientUUID, err := uuid.Parse(req.ClientID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue