Skip to content

Commit

Permalink
ASAP-412 삭제할 때 main 행성이 포함될때에만 main이 수정되도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
tlarbals824 committed Feb 8, 2025
1 parent d998273 commit c59a915
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,13 @@ class SpaceCommandService(
userId = userId,
spaceId = DomainId(command.spaceId),
).apply {
if (isMain) {
updateMainSpace(userId)
}

delete()
spaceManagementPort.deleteBy(this)
}
updateMainSpace(userId)
reIndexingSpaceOrder(userId)
}

Expand All @@ -62,10 +65,13 @@ class SpaceCommandService(
userId = userId,
spaceIds = command.spaceIds.map { DomainId(it) },
).forEach {
if (it.isMain) {
updateMainSpace(userId)
}
it.delete()
spaceManagementPort.deleteBy(it)
}
updateMainSpace(userId)

reIndexingSpaceOrder(userId)
}

Expand Down

0 comments on commit c59a915

Please sign in to comment.