feat: add Level field to role creation and update functionality
Deploy Application / deploy (push) Successful in 23s Details

This commit is contained in:
Habib Fatkhul Rohman 2025-11-21 14:00:07 +07:00
parent 15dce0f540
commit 69eb45c1fc
1 changed files with 4 additions and 0 deletions

View File

@ -273,6 +273,7 @@ func (r *roleService) CreateRole(ctx context.Context, req dto.RoleCreateRequest)
Name: req.Name,
Description: req.Description,
IconUrl: req.IconUrl,
Level: req.Level,
Type: req.Type,
HomeUrl: req.HomeUrl,
ClientID: clientUUID,
@ -493,6 +494,9 @@ func (r *roleService) UpdateRole(ctx context.Context, id string, req dto.RoleUpd
if req.HomeUrl != "" {
existingRole.HomeUrl = req.HomeUrl
}
if req.Level != 0 {
existingRole.Level = req.Level
}
updatedRole, err := r.roleRepo.UpdateRole(ctx, r.db, existingRole)
if err != nil {