diff --git a/src/main/kotlin/kr/hs/dsm/inq/domain/user/persistence/User.kt b/src/main/kotlin/kr/hs/dsm/inq/domain/user/persistence/User.kt index fa2c5c5..85139f3 100644 --- a/src/main/kotlin/kr/hs/dsm/inq/domain/user/persistence/User.kt +++ b/src/main/kotlin/kr/hs/dsm/inq/domain/user/persistence/User.kt @@ -40,9 +40,9 @@ data class User( var coin: Int = 0 ) { - fun updateInfo(request: UpdateUserInfoRequest) { - this.username = request.username - this.job = request.job - this.jobDuration = request.jobDuration + fun updateInfo(username: String, job: String, jobDuration: Int) { + this.username = username + this.job = job + this.jobDuration = jobDuration } } \ No newline at end of file diff --git a/src/main/kotlin/kr/hs/dsm/inq/domain/user/service/UserService.kt b/src/main/kotlin/kr/hs/dsm/inq/domain/user/service/UserService.kt index ae3abc3..214e74d 100644 --- a/src/main/kotlin/kr/hs/dsm/inq/domain/user/service/UserService.kt +++ b/src/main/kotlin/kr/hs/dsm/inq/domain/user/service/UserService.kt @@ -69,7 +69,9 @@ class UserService( fun updateUserInfo(request: UpdateUserInfoRequest) { val user = SecurityUtil.getCurrentUser() - user.updateInfo(request) + user.updateInfo(request.username, request.job, request.jobDuration) + + userRepository.save(user) } fun queryUserAttendance(): UserAttendanceResponse {