fix(user): handle experience and education updates in update_user usecase

This commit is contained in:
GoHorse Deploy 2026-03-07 15:11:13 -03:00
parent a3febf2087
commit aae5cbefb5

View file

@ -77,6 +77,16 @@ func (uc *UpdateUserUseCase) Execute(ctx context.Context, id, tenantID string, i
user.Skills = input.Skills
}
// Fix Experience/Education conversion from []any to *string (placeholder logic)
if len(input.Experience) > 0 {
expStr := "Experience data updated"
user.Experience = &expStr
}
if len(input.Education) > 0 {
eduStr := "Education data updated"
user.Education = &eduStr
}
// 4. Save
updated, err := uc.userRepo.Update(ctx, user)
if err != nil {