Skip to content

Commit

Permalink
🔧 added function so profileEntity is created and saved in profileRepo…
Browse files Browse the repository at this point in the history
…sitory
  • Loading branch information
jafacode committed Jan 20, 2025
1 parent 7be0c82 commit 8d191ce
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,14 @@ class UserService(
updatedAt = Instant.now(),
)
val savedUser = userRepository.save(newUser) // This should save as SocialUser

val profileEntity =
ProfileEntity(
user = newUser,
)

profileRepository.save(profileEntity)

User.fromEntity(savedUser) // Convert and return as User DTO
}
}
Expand Down

0 comments on commit 8d191ce

Please sign in to comment.