-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feat: readSharedExamInfo 구현 #257
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -9,6 +9,7 @@ import com.swm_standard.phote.dto.CreateSharedExamRequest | |||||||||||||||
import com.swm_standard.phote.dto.GradeExamRequest | ||||||||||||||||
import com.swm_standard.phote.dto.GradeExamResponse | ||||||||||||||||
import com.swm_standard.phote.dto.ReadAllSharedExamsResponse | ||||||||||||||||
import com.swm_standard.phote.dto.ReadSharedExamInfoResponse | ||||||||||||||||
import com.swm_standard.phote.dto.ReadExamHistoryDetail | ||||||||||||||||
import com.swm_standard.phote.dto.ReadExamHistoryDetailResponse | ||||||||||||||||
import com.swm_standard.phote.dto.ReadExamHistoryListResponse | ||||||||||||||||
|
@@ -359,6 +360,19 @@ class ExamService( | |||||||||||||||
return examsAsCreator + examsAsExaminee | ||||||||||||||||
} | ||||||||||||||||
|
||||||||||||||||
fun readSharedExamInfo(examId: UUID, memberId: UUID): ReadSharedExamInfoResponse { | ||||||||||||||||
val sharedExam = sharedExamRepository.findById(examId).orElseThrow { NotFoundException(fieldName = "examId") } | ||||||||||||||||
return ReadSharedExamInfoResponse( | ||||||||||||||||
examId = examId, | ||||||||||||||||
title = sharedExam.title, | ||||||||||||||||
startTime = sharedExam.startTime, | ||||||||||||||||
endTime = sharedExam.endTime, | ||||||||||||||||
capacity = sharedExam.capacity, | ||||||||||||||||
workbookId = sharedExam.workbook.id, | ||||||||||||||||
isWriter = sharedExam.member.id == memberId, | ||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
이거 |
||||||||||||||||
) | ||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 여기서 공유용 시험을 생성한 사람이 조회하는거면 응시자 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 클라에 정확히 머 필요한지 함 물어볼게!! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 오오오키오키 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이거 api가 따로 있었네연. ㅎ |
||||||||||||||||
} | ||||||||||||||||
|
||||||||||||||||
private fun findWorkbook(workbookId: UUID): Workbook = | ||||||||||||||||
workbookRepository | ||||||||||||||||
.findById( | ||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.