Skip to content

Commit

Permalink
feat: 재물펫과 합성펫의 id가 같으면 예외를 던진다
Browse files Browse the repository at this point in the history
  • Loading branch information
devxb committed Sep 8, 2024
1 parent 4c92928 commit 4e8654c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/kotlin/org/gitanimals/render/domain/User.kt
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ class User(
.toString()

fun mergePersona(increasePersonaId: Long, deletePersonaId: Long) {
require(increasePersonaId != deletePersonaId) {
"increasePersonaId \"$increasePersonaId\", deletePersonaId \"$deletePersonaId\" must be different"
}

val increasePersona = personas.first { it.id == increasePersonaId }
val deletePersona = personas.first { it.id == deletePersonaId }

Expand Down

0 comments on commit 4e8654c

Please sign in to comment.