Skip to content

Commit

Permalink
add :: checkAccountId api
Browse files Browse the repository at this point in the history
  • Loading branch information
meltapplee committed Sep 2, 2024
1 parent 67edc98 commit e7c7fa0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package org.meogo.domain.user.presentation.dto.request

data class UserCheckRequest(
val accountId: String
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package org.meogo.domain.user.service

import org.meogo.domain.user.presentation.dto.request.UserCheckRequest
import org.meogo.domain.user.repository.UserRepository
import org.springframework.stereotype.Service

@Service
class CheckAccountIdService(
private val userRepository: UserRepository
) {
fun execute(request: UserCheckRequest): Boolean {
return userRepository.existsByAccountId(request.accountId)
}
}

0 comments on commit e7c7fa0

Please sign in to comment.