Conversation
Closed
3 tasks
There was a problem hiding this comment.
Pull request overview
관리자가 특정 세션에 대해 “이해도 체크(understanding check)”를 생성할 수 있는 API를 백엔드에 추가하고, 이해도 체크 관련 응답 DTO 구조를 content 중심으로 정리합니다.
Changes:
- 관리자 전용 이해도 체크 생성 API(
POST /api/sessions/{sessionId}/understanding-checks) 추가 - 이해도 체크 생성 요청/응답 DTO 및 성공 코드(
UNDERSTANDING_CHECK_CREATED) 추가 - SecurityConfig에 이해도 체크 생성 API의 ADMIN 접근 제어 추가
- 이해도 체크 조회 응답 DTO를
title/description→content중심으로 정리
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| backend/src/main/java/com/example/Piroin/project/global/config/SecurityConfig.java | 이해도 체크 생성 API에 대한 ADMIN 권한 매처 추가 |
| backend/src/main/java/com/example/Piroin/project/domain/question/service/QuestionService.java | 이해도 체크 생성 서비스 로직 및 관리자 검증/요청 검증 추가, 이해도 체크 응답 DTO 매핑 변경 |
| backend/src/main/java/com/example/Piroin/project/domain/question/exception/code/QuestionSuccessCode.java | 이해도 체크 생성 성공 코드 추가 |
| backend/src/main/java/com/example/Piroin/project/domain/question/dto/QuestionResDTO.java | 이해도 체크 응답 DTO 필드 구조 정리 및 생성 응답 DTO 추가 |
| backend/src/main/java/com/example/Piroin/project/domain/question/dto/QuestionReqDTO.java | 이해도 체크 생성 요청 DTO 추가 |
| backend/src/main/java/com/example/Piroin/project/domain/question/controller/QuestionController.java | 이해도 체크 생성 API 엔드포인트 추가 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+245
to
+249
| validateUnderstandingCheckCreateRequest(request); | ||
| User loginUser = findLoginUser(userId); | ||
| validateAdmin(loginUser); | ||
| StudySession session = findSession(sessionId); | ||
|
|
| .requestMatchers(HttpMethod.DELETE, "/api/curriculums/{id}").hasRole("ADMIN") | ||
|
|
||
| // understanding check: 생성은 ADMIN만 가능 | ||
| .requestMatchers(HttpMethod.POST, "/api/sessions/*/understanding-checks").hasRole("ADMIN") |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
#️⃣연관된 이슈
#74
📝작업 내용
이해도 체크 생성 API 추가
POST /api/sessions/{sessionId}/understanding-checkscontent값을 기반으로 이해도 체크 생성이해도 체크 생성 요청/응답 DTO 추가
UnderstandingCheckCreateReqUnderstandingCheckCreateResponse이해도 체크 생성 검증 로직 추가
이해도 체크 생성 권한 설정 추가
SecurityConfig에서 이해도 체크 생성 API는ADMIN만 접근 가능하도록 설정이해도 체크 응답 구조 일부 정리
title,description중심 응답을content중심으로 정리UNDERSTANDING_CHECK_CREATED추가