Skip to content

Commit

Permalink
탈퇴한 유저의 이메일은 다시 사용할 수 있게 하기 (#351)
Browse files Browse the repository at this point in the history
* feat: remove email on delete user

* chore: remove comment
  • Loading branch information
jyoo0515 authored Jul 26, 2024
1 parent c251fba commit f1c98e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class User(
var nickname: String,
@Deprecated("닉네임 로그인은 사라질 예정") var encryptedPassword: String?,
var instagramId: String?,
var email: String?, // FIXME: 레거시 계정이 모두 사라지면 non-nullable로 변경
var email: String?,
@Column(columnDefinition = "TEXT")
@Convert(converter = UserMobilityToolListToTextAttributeConverter::class)
val mobilityTools: MutableList<UserMobilityTool>,
Expand All @@ -29,6 +29,7 @@ class User(
get() = deletedAt != null

fun delete(deletedAt: Instant) {
this.email = null
this.deletedAt = deletedAt
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class DeleteUserTest : UserITBase() {
transactionManager.doInTransaction {
val deletedUser = userRepository.findById(user.id).get()
assertTrue(deletedUser.isDeleted)
assertNull(deletedUser.email)
}
}

Expand Down

0 comments on commit f1c98e0

Please sign in to comment.