Skip to content

Commit

Permalink
refactor: change api path
Browse files Browse the repository at this point in the history
  • Loading branch information
gikhoon committed Dec 22, 2024
1 parent fe14323 commit 11daf8c
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,13 @@

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import org.cotato.csquiz.api.quiz.dto.RandomQuizReplyRequest;
import org.cotato.csquiz.api.quiz.dto.RandomQuizReplyResponse;
import org.cotato.csquiz.api.quiz.dto.RandomTutorialQuizResponse;
import org.cotato.csquiz.domain.education.service.RandomQuizService;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
Expand All @@ -32,8 +28,8 @@ public ResponseEntity<RandomTutorialQuizResponse> pickRandomQuiz() {
}

@Operation(summary = "외부인용 랜덤 퀴즈 제출 API")
@GetMapping("/{quizId}/reply")
public ResponseEntity<RandomQuizReplyResponse> replyToRandomQuiz(@PathVariable(name = "quizId") final Long randomQuizId,
@GetMapping("/{randomQuizId}/reply")
public ResponseEntity<RandomQuizReplyResponse> replyToRandomQuiz(@PathVariable(name = "randomQuizId") final Long randomQuizId,
@RequestParam(name = "input") Integer input) {
return ResponseEntity.ok().body(randomQuizService.replyToRandomQuiz(randomQuizId, input));
}
Expand Down

0 comments on commit 11daf8c

Please sign in to comment.