-
Notifications
You must be signed in to change notification settings - Fork 3
[refactor] 퀴즈, 문제 수정 API 리팩토링 #146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
70d2f9f
:recycle: refactor : 퀴즈 수정, 문제 수정 API 리팩토링
silver-eunjoo 665d56a
chore: Java 스타일 수정
9123bc1
:wrench: chore: 타이머 로그 기록
silver-eunjoo d106451
chore: Java 스타일 수정
f0d703f
:recycle: refactor : DTO Valid 추가
silver-eunjoo e4c4bd8
chore: Java 스타일 수정
80c4aa8
:recycle: refactor: UPDATE시 문제 생성도 가능
silver-eunjoo 409c3d2
chore: Java 스타일 수정
c03e770
:wrench: chore: 타이머 관련 로그 수정
silver-eunjoo 96b2bab
:recycle: refactor: 새로 생성 후 return
silver-eunjoo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
23 changes: 22 additions & 1 deletion
23
backend/src/main/java/io/f1/backend/domain/question/dto/QuestionUpdateRequest.java
This file contains hidden or 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 |
|---|---|---|
| @@ -1,3 +1,24 @@ | ||
| package io.f1.backend.domain.question.dto; | ||
|
|
||
| public record QuestionUpdateRequest(String content, String answer) {} | ||
| import io.f1.backend.global.validation.TrimmedSize; | ||
|
|
||
| import jakarta.validation.constraints.NotBlank; | ||
|
|
||
| import lombok.AccessLevel; | ||
| import lombok.Getter; | ||
| import lombok.NoArgsConstructor; | ||
|
|
||
| @Getter | ||
| @NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
| public class QuestionUpdateRequest { | ||
|
|
||
| private Long id; | ||
|
|
||
| @TrimmedSize(min = 5, max = 30) | ||
| @NotBlank(message = "문제를 입력해주세요.") | ||
| private String content; | ||
|
|
||
| @TrimmedSize(min = 1, max = 30) | ||
| @NotBlank(message = "정답을 입력해주세요.") | ||
| private String answer; | ||
| } |
This file contains hidden or 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 hidden or 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
28 changes: 27 additions & 1 deletion
28
backend/src/main/java/io/f1/backend/domain/quiz/dto/QuizUpdateRequest.java
This file contains hidden or 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 |
|---|---|---|
| @@ -1,3 +1,29 @@ | ||
| package io.f1.backend.domain.quiz.dto; | ||
|
|
||
| public record QuizUpdateRequest(String title, String description) {} | ||
| import io.f1.backend.domain.question.dto.QuestionUpdateRequest; | ||
| import io.f1.backend.global.validation.TrimmedSize; | ||
|
|
||
| import jakarta.validation.constraints.NotBlank; | ||
| import jakarta.validation.constraints.Size; | ||
|
|
||
| import lombok.AccessLevel; | ||
| import lombok.Getter; | ||
| import lombok.NoArgsConstructor; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| @Getter | ||
| @NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
| public class QuizUpdateRequest { | ||
|
|
||
| @TrimmedSize(min = 2, max = 30) | ||
| @NotBlank(message = "퀴즈 제목을 설정해주세요.") | ||
| private String title; | ||
|
|
||
| @TrimmedSize(min = 10, max = 50) | ||
| @NotBlank(message = "퀴즈 설명을 적어주세요.") | ||
| private String description; | ||
|
|
||
| @Size(min = 10, max = 80, message = "문제는 최소 10개, 최대 80개로 정해주세요.") | ||
| private List<QuestionUpdateRequest> questions; | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.