Skip to content

Commit

Permalink
Merge pull request #3 from Tiketeer/feat/DEV-244
Browse files Browse the repository at this point in the history
[DEV-244] WaitingController 작성
  • Loading branch information
One-armed-boy authored May 2, 2024
2 parents e7e8d59 + 2c474a0 commit 7fe7b47
Showing 1 changed file with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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 = "[email protected]"
val result = getRankAndTokenUseCase.getRankAndToken(GetRankAndTokenCommandDto(email, ticketingId))
return GetRankAndTokenResponseDto.convertFromDto(result)
}
}

0 comments on commit 7fe7b47

Please sign in to comment.