Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#107 - 프로필 설정 변경 및 welcome 메시지를 변경한다 #108

Merged
merged 5 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions app/src/test/kotlin/com/wespot/user/fixture/UserFixture.kt
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,8 @@ object UserFixture {
profile: Profile = Profile(0, "black", "image.png"),
) = UpdateProfileRequest(
introduction = introduction,
profile = ProfileRequest(
backgroundColor = profile.backgroundColor,
iconUrl = profile.iconUrl
)
backgroundColor = profile.backgroundColor,
iconUrl = profile.iconUrl
)

fun createUser(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ class UserServiceTest : BehaviorSpec({
user.copy(
introduction = profileRequest.introduction?.let { UserIntroduction.from(it) } ?: user.introduction,
profile = profile.copy(
backgroundColor = profileRequest.profile?.backgroundColor ?: user.profile.backgroundColor,
iconUrl = profileRequest.profile?.iconUrl ?: user.profile.iconUrl
backgroundColor = profileRequest.backgroundColor ?: user.profile.backgroundColor,
iconUrl = profileRequest.iconUrl ?: user.profile.iconUrl
)
)
}
Expand All @@ -93,8 +93,8 @@ class UserServiceTest : BehaviorSpec({

then("프로필이 업데이트 되어야 한다") {
user.introduction.introduction shouldBe profileRequest.introduction
user.profile.backgroundColor shouldBe profileRequest.profile?.backgroundColor
user.profile.iconUrl shouldBe profileRequest.profile?.iconUrl
user.profile.backgroundColor shouldBe profileRequest.backgroundColor
user.profile.iconUrl shouldBe profileRequest.iconUrl
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.wespot.user.dto.request

import com.wespot.auth.dto.request.ProfileRequest

data class UpdateProfileRequest(
val introduction: String?,
val profile: ProfileRequest?
val backgroundColor: String?,
val iconUrl: String?,
)
4 changes: 2 additions & 2 deletions core/src/main/kotlin/com/wespot/user/service/UserService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ class UserService(
val loginUser = getLoginUser(userPort = userPort)
val updatedIntroduction = profile.introduction ?: loginUser.introduction.introduction
val updatedProfile = loginUser.profile.update(
backgroundColor = profile.profile?.backgroundColor ?: loginUser.profile.backgroundColor,
iconUrl = profile.profile?.iconUrl ?: loginUser.profile.iconUrl
backgroundColor = profile.backgroundColor ?: loginUser.profile.backgroundColor,
iconUrl = profile.iconUrl ?: loginUser.profile.iconUrl
)

val updatedUser = loginUser.copy(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ data class MessageContent(
return MessageContent("안녕하세요 ${receiverName}님 \n" +
"위스팟에 오신 것을 정말 환영해요!\n" +
"\n" +
"제가 큐피트가 되어 000님의 소중한 마음들을 전달해 드릴테니 언제든 익명 쪽지함을 찾아와 주세요!\n" +
"제가 큐피트가 되어 ${receiverName}님의 소중한 마음들을 전달해 드릴테니 언제든 익명 쪽지함을 찾아와 주세요!\n" +
"\n" +
"설레는 시간을 보내시길 바라며..")
}
Expand Down
Loading