File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
src/main/kotlin/andreas311/miso/domain/user/adapter/input Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change
1
+ package andreas311.miso.domain.user.adapter.input
2
+
3
+ import andreas311.miso.common.annotation.RequestController
4
+ import andreas311.miso.domain.user.adapter.input.data.response.UserInfoResponse
5
+ import andreas311.miso.domain.user.adapter.input.mapper.UserDataMapper
6
+ import andreas311.miso.domain.user.application.port.input.UserInfoUseCase
7
+ import org.springframework.http.HttpStatus
8
+ import org.springframework.http.ResponseEntity
9
+ import org.springframework.web.bind.annotation.GetMapping
10
+
11
+ @RequestController(" /user" )
12
+ class UserAdapter (
13
+ private val userDataMapper : UserDataMapper ,
14
+ private val userInfoUseCase : UserInfoUseCase
15
+ ) {
16
+ @GetMapping
17
+ fun userInfo (): ResponseEntity <UserInfoResponse > =
18
+ userInfoUseCase.execute()
19
+ .let { userDataMapper.toResponse(it) }
20
+ .let { ResponseEntity .status(HttpStatus .OK ).body(it) }
21
+ }
You can’t perform that action at this time.
0 commit comments