From 2c474a09c57cf50c0c2e52d0dc31573917700836 Mon Sep 17 00:00:00 2001 From: One-armed-boy Date: Thu, 2 May 2024 16:16:16 +0900 Subject: [PATCH] =?UTF-8?q?WaitingController=20=EC=9E=91=EC=84=B1=20-=20?= =?UTF-8?q?=EC=9D=B4=EB=A9=94=EC=9D=BC=20=EA=B4=80=EB=A0=A8=20=EB=A1=9C?= =?UTF-8?q?=EC=A7=81=EC=9D=80=20=EC=9E=84=EC=8B=9C=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../waiting/controller/WaitingController.kt | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/main/kotlin/com/tiketeer/TiketeerWaiting/domain/waiting/controller/WaitingController.kt diff --git a/src/main/kotlin/com/tiketeer/TiketeerWaiting/domain/waiting/controller/WaitingController.kt b/src/main/kotlin/com/tiketeer/TiketeerWaiting/domain/waiting/controller/WaitingController.kt new file mode 100644 index 0000000..7d83234 --- /dev/null +++ b/src/main/kotlin/com/tiketeer/TiketeerWaiting/domain/waiting/controller/WaitingController.kt @@ -0,0 +1,24 @@ +package com.tiketeer.TiketeerWaiting.domain.waiting.controller + +import com.tiketeer.TiketeerWaiting.domain.waiting.controller.dto.GetRankAndTokenResponseDto +import com.tiketeer.TiketeerWaiting.domain.waiting.usecase.GetRankAndToken +import com.tiketeer.TiketeerWaiting.domain.waiting.usecase.dto.GetRankAndTokenCommandDto +import org.springframework.web.bind.annotation.GetMapping +import org.springframework.web.bind.annotation.RequestMapping +import org.springframework.web.bind.annotation.RequestParam +import org.springframework.web.bind.annotation.RestController +import java.util.UUID + +@RestController +@RequestMapping("/waiting") +class WaitingController( + private val getRankAndTokenUseCase: GetRankAndToken +) { + @GetMapping + fun getRankAndToken(@RequestParam(required = true) ticketingId: UUID): GetRankAndTokenResponseDto { + // TODO: JWT 디코딩 필터 적용 후 JWT 내에서 가져오도록 수정 + val email = "test@test.com" + val result = getRankAndTokenUseCase.getRankAndToken(GetRankAndTokenCommandDto(email, ticketingId)) + return GetRankAndTokenResponseDto.convertFromDto(result) + } +} \ No newline at end of file