Skip to content

Commit

Permalink
chore: ktlint format
Browse files Browse the repository at this point in the history
  • Loading branch information
210-reverof committed Sep 4, 2024
1 parent 1c4a8a0 commit dfcf230
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package com.mashup.pic.group.applicationservice
import com.mashup.pic.common.exception.PicException
import com.mashup.pic.common.exception.PicExceptionType
import com.mashup.pic.domain.event.EventDto
import com.mashup.pic.domain.event.EventJoinRepository
import com.mashup.pic.domain.event.EventService
import com.mashup.pic.domain.event.EventStatus
import com.mashup.pic.domain.event.UploadService
Expand Down Expand Up @@ -34,7 +33,6 @@ import com.mashup.pic.group.util.GroupViewStatusUtil
import com.mashup.pic.util.InviteCodeUtil
import org.springframework.stereotype.Service
import org.springframework.transaction.annotation.Transactional
import java.io.PipedReader
import java.time.LocalDateTime

@Service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@ interface GroupJoinRepository : JpaRepository<GroupJoin, Long> {

fun findAllByUserId(userId: Long): List<GroupJoin>

fun deleteByUserIdAndGroupId(userId: Long, groupId: Long)
fun deleteByUserIdAndGroupId(
userId: Long,
groupId: Long
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ class GroupService(
}

@Transactional
fun withdraw(userId: Long, groupId: Long) {
fun withdraw(
userId: Long,
groupId: Long
) {
if (!groupJoinRepository.existsByUserIdAndGroupId(userId, groupId)) {
throw PicException.of(PicExceptionType.NOT_EXIST, "참여하고 있는 그룹이 아닙니다")
}
Expand Down

0 comments on commit dfcf230

Please sign in to comment.