Skip to content

Commit

Permalink
πŸ“ :: Exception
Browse files Browse the repository at this point in the history
  • Loading branch information
gurdl0525 committed Oct 20, 2023
1 parent 9235984 commit bba896e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import com.example.highthon.domain.auth.exception.*
import com.example.highthon.domain.auth.presentation.dto.request.PhoneNumberSmsRequest
import com.example.highthon.domain.auth.presentation.dto.request.SignUpSmsRequest
import com.example.highthon.domain.auth.repository.QualificationRepository
import com.example.highthon.domain.user.exception.UserNotFoundException
import com.example.highthon.domain.user.repository.UserRepository
import com.example.highthon.global.env.sms.SmsProperty
import mu.KLogger
Expand Down Expand Up @@ -88,7 +89,7 @@ class SmsServiceImpl(
@Transactional
override fun sendPhoneNumberMessage(req: PhoneNumberSmsRequest): SingleMessageSentResponse? {

if (!userRepository.existsByPhoneNumber(req.phoneNumber!!)) throw PhoneNumberNotExistException
if (!userRepository.existsByPhoneNumber(req.phoneNumber!!)) throw UserNotFoundException

if (qualificationRepository.existsById(req.phoneNumber)) throw AlreadyPostedMessageException

Expand Down

0 comments on commit bba896e

Please sign in to comment.