-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Client로직 추가 #20
Client로직 추가 #20
Conversation
class ClientNotFindException: BasicException(ErrorCode.CLIENT_NOT_FOUND) { | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
얘 { } 안붙여도됨
} | ||
|
||
@GetMapping | ||
fun getAllClients(): ResponseEntity<List<ClientAllResDto>>{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fun getAllClients(): ResponseEntity<List<ClientAllResDto>>{ | |
fun getMyAllClients(): ResponseEntity<List<ClientAllResDto>>{ |
어떰
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
컨트롤러도 그렇게 해야될까
private val currentUserUtil: CurrentUserUtil, | ||
){ | ||
fun execute(clientRegisterDto: ClientRegisterReqDto): ClientRegisterResDto { | ||
val clientSecret = UUID.randomUUID().toString().replace("-", "") + UUID.randomUUID().toString().replace("-", "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
val clientSecret = UUID.randomUUID().toString().replace("-", "") + UUID.randomUUID().toString().replace("-", "") | |
val clientSecret = (UUID.randomUUID().toString()+ UUID.randomUUID().toString()).replace("-", "") |
이런식 어떰
class GetOneClientService( | ||
private val clientRepository: ClientRepository, | ||
private val currentUserUtil: CurrentUserUtil, | ||
){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Transactional(readOnly = true) 어떰
@PatchMapping("/{id}") | ||
fun updateClient(@PathVariable id:String, @RequestBody clientUpdateDto: ClientUpdateReqDto): ResponseEntity<Void>{ | ||
updateClientService.updateClient(id, clientUpdateDto) | ||
return ResponseEntity.ok().build() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no content어땨
val serviceName: String, | ||
val serviceUri: String, | ||
) { | ||
constructor(client:Client): this( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
constructor(client:Client): this( | |
constructor(client: Client): this( |
으악 린트 불편해용
} | ||
|
||
fun getCurrentUser(): User = | ||
userRepository.findByEmail(getCurrentEmail())!! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
언래핑보다 throw 처리하자
한일