Skip to content

Commit

Permalink
chore: (#286) 같은 지점 비교 구문식 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
softpeanut committed Jan 10, 2023
1 parent a2b5bc1 commit 49095d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class ChangeSpotScheduleUseCase(
val schedule = querySchedulePort.queryScheduleById(request.scheduleId)
?: throw ScheduleExceptions.NotFound()

if (schedule.isSameSpot(user.spotId) && user.authority != Authority.ROLE_SUPER) {
if (!schedule.isSameSpot(user.spotId) && user.authority != Authority.ROLE_SUPER) {
throw UserExceptions.NotEnoughPermission("같은 지점 관리자이거나 최고 관리자이어야 합니다.")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class RemoveSpotScheduleUseCase(

schedule.checkScope(Scope.ENTIRE)

if (schedule.isSameSpot(user.spotId) && user.authority != Authority.ROLE_SUPER) {
if (!schedule.isSameSpot(user.spotId) && user.authority != Authority.ROLE_SUPER) {
throw UserExceptions.NotEnoughPermission("같은 지점 관리자이거나 최고 관리자이어야 합니다.")
}

Expand Down

0 comments on commit 49095d8

Please sign in to comment.