-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from Tiketeer/feat/DEV-244
[DEV-244] WaitingController 작성
- Loading branch information
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
src/main/kotlin/com/tiketeer/TiketeerWaiting/domain/waiting/controller/WaitingController.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
} | ||
} |