-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[COT-118] Feature: 랜덤 퀴즈 제출 API 구현 (#246)
* feat: develop reply to randomQuiz API * style: rename parameter quizId -> randomQuizId * refactor: change RandomQuiz reply API from POST to GET * refactor: change type of randomquiz result * refactor: change type of quiz result * refactor: change api path * Revert "refactor: change type of quiz result" This reverts commit fe14323.
- Loading branch information
Showing
7 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
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
9 changes: 9 additions & 0 deletions
9
src/main/java/org/cotato/csquiz/api/quiz/dto/RandomQuizReplyRequest.java
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,9 @@ | ||
package org.cotato.csquiz.api.quiz.dto; | ||
|
||
import jakarta.validation.constraints.NotNull; | ||
|
||
public record RandomQuizReplyRequest( | ||
@NotNull | ||
Integer input | ||
) { | ||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/org/cotato/csquiz/api/quiz/dto/RandomQuizReplyResponse.java
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,13 @@ | ||
package org.cotato.csquiz.api.quiz.dto; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode; | ||
|
||
public record RandomQuizReplyResponse( | ||
@Schema(requiredMode = RequiredMode.REQUIRED) | ||
boolean result | ||
) { | ||
public static RandomQuizReplyResponse from(Boolean isCorrect) { | ||
return new RandomQuizReplyResponse(isCorrect); | ||
} | ||
} |
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
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
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
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