This repository was archived by the owner on Jul 7, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +16
-15
lines changed
Bootstrap-Module/src/main/kotlin/com/asap/bootstrap/web/letter Expand file tree Collapse file tree 2 files changed +16
-15
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ import org.springframework.web.bind.annotation.RequestParam
1515@Tag(name = " Letter" , description = " Letter API" )
1616@RequestMapping(" /api/v1/letters/logs" )
1717interface LetterLogApi {
18-
1918 @Operation(summary = " 편지 공유 상태 조회" )
2019 @GetMapping(" /share/status" )
2120 @ApiResponses(
@@ -41,14 +40,14 @@ interface LetterLogApi {
4140 content = [
4241 Content (
4342 mediaType = " application/json" ,
44- schema = Schema (implementation = LetterShareStatusResponse ::class )
45- )
46- ]
47- )
48- ]
43+ schema = Schema (implementation = LetterShareStatusResponse ::class ),
44+ ),
45+ ],
46+ ),
47+ ],
4948 )
5049 fun getLetterShareStatus (
5150 @RequestParam(" letterCode" ) letterCode : String ,
52- @AccessUser userId : String
51+ @AccessUser userId : String? ,
5352 ): LetterShareStatusResponse
5453}
Original file line number Diff line number Diff line change @@ -10,18 +10,20 @@ import org.springframework.web.bind.annotation.RestController
1010@RestController
1111class LetterLogController (
1212 private val letterLogUsecase : LetterLogUsecase ,
13- private val objectMapper : ObjectMapper
13+ private val objectMapper : ObjectMapper ,
1414) : LetterLogApi {
15- override fun getLetterShareStatus (letterCode : String , userId : String ): LetterShareStatusResponse {
16- return letterLogUsecase.finLatestLogByLetterCode(letterCode)?.let {
17- val kakaoWebHookRequest =
18- objectMapper.readValue(it.logContent, KakaoWebHookRequest ::class .java)
15+ override fun getLetterShareStatus (
16+ letterCode : String ,
17+ userId : String? ,
18+ ): LetterShareStatusResponse =
19+ letterLogUsecase.finLatestLogByLetterCode(letterCode)?.let {
20+ val kakaoWebHookRequest = objectMapper.readValue(it.logContent, KakaoWebHookRequest ::class .java)
21+
1922 LetterShareStatusResponse .success(
2023 letterId = it.letterId,
21- shareTarget = kakaoWebHookRequest.chatType
24+ shareTarget = kakaoWebHookRequest.chatType,
2225 )
2326 } ? : run {
2427 LetterShareStatusResponse .fail()
2528 }
26- }
27- }
29+ }
You can’t perform that action at this time.
0 commit comments