fix(user): handle experience and education updates in update_user usecase
This commit is contained in:
parent
a3febf2087
commit
aae5cbefb5
1 changed files with 10 additions and 0 deletions
|
|
@ -77,6 +77,16 @@ func (uc *UpdateUserUseCase) Execute(ctx context.Context, id, tenantID string, i
|
||||||
user.Skills = input.Skills
|
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
|
// 4. Save
|
||||||
updated, err := uc.userRepo.Update(ctx, user)
|
updated, err := uc.userRepo.Update(ctx, user)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue