Skip to content

docs(be): add client/submission jsdoc#3483

Open
westsunh wants to merge 11 commits intomainfrom
t2529-add-jsdoc-client-summision-service
Open

docs(be): add client/submission jsdoc#3483
westsunh wants to merge 11 commits intomainfrom
t2529-add-jsdoc-client-summision-service

Conversation

@westsunh
Copy link

Description

client/submission에 양식에 맞게 jsdoc 추가

Additional context


Before submitting the PR, please make sure you do the following

* 6. isUserTest = false인 경우
* - `containHiddenTestcases` 플래그에 따라 히든 테스트 케이스에 대한 결과를 포함할 지 결정
* 1) isGroupLeader: 해당 문제가 속한 UserGroup의 GroupLeader인 경우 포함
* 2) isContestStaff: 해당 문제가 속한 Contest의 Admin / Manager / Reviewer인 경우 포함
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

사소한거긴한데 형식 통일을 위해 여기 엔터 한줄만 뜁시다!

* 2. 제출 ID가 없으면 빈 배열([])을 반환
* 3. 캐시에서 해당 제출에 포함된 전체 테스트케이스 ID 목록을 가져옴
* 4. 각 테스트케이스 ID를 순회하며, 캐시에 저장된 개별 상세 결과(상태, 출력값 등)를 수집
* 5. 최종적으로 수집된 테스트 결과 배열을 반환
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기도 한줄 띄우기!

* 1. 주어진 assignmentId와 groupId에 해당하는 진행 중인 과제가 있는지 확인
* 1. assignmentId로 현재 시각 기준 진행 중인 Assignment인지 확인
* 2. 사용자가 해당 과제에 등록되어 있는지 확인
* 3. 과제가 진행 중인지 및 그룹 조건을 만족하는지 확인
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이번에 수정한거 아니긴 한데 여기 부분도 그룹조건 확인이 이미 위에 2번에서 설명된 것 같고, 3번에서는 오히려 시간 조건을 체크하는 거라서 '3. 과제가 현재 진행 중인지 시간 조건을 확인' 이렇게 수정하는게 뭔가 더 좋을 것 같아요!

if (
submission.userId !== userId &&
userRole !== Role.Admin &&
userRole !== Role.SuperAdmin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

흠 getsubmission은 admin이랑 superadmin 둘다 관리자로 취급하는데...
@RyuRaseul

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

??

const isAdmin = await this.prisma.user.findFirst({
where: {
id: userId,
role: 'Admin'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

얘는 Admin만 확인하네요. 제출을 superadmin도 볼 수 있어야하는거 아닌가요? 그때 role 정리 어떻게 했더라...? @RyuRaseul

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이상하네

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

도현이 귀여워

if (!contestRecord) {
throw new EntityNotExistException('ContestRecord')
}
if (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이거 로직 좀 이상하지 않나요? 이미 여기서 contestRecord 찾고 starttime이랑 endtime 조건 체크를 하고 conflictfoundexception 발생시키는데, line 150에서 이미 체크하고 오는거 아닌가요?
문제 되진 않을 것 같은데 뭔가 중복이어보임! 어케 생각하세요 다들
@RyuRaseul @nhjbest22

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

그러게 근데 여기서 고칠 수정 사항은 아닌듯함...
@westsunh ㄱㅊ으시면 여기에 // TODO 주석만 달아주세요

@Choi-Jung-Hyeon Choi-Jung-Hyeon self-requested a review March 17, 2026 18:30
* - assignmentId: 과제 제출인 경우 제공해야 함
* - workbookId: 워크북 제출인 경우 제공해야 함
* @param {boolean} [params.stopOnNotAccepted=false] - 오답 발생 시 이후 테스트케이스 채점을 중단할지 여부
* * @param {boolean} [params.judgeOnlyHiddenTestcases=false] - 히든 테스트케이스만 채점할지 여부
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기 * 하나만 지워주세요!

if (!contestRecord) {
throw new EntityNotExistException('ContestRecord')
}
if (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

그러게 근데 여기서 고칠 수정 사항은 아닌듯함...
@westsunh ㄱㅊ으시면 여기에 // TODO 주석만 달아주세요

Comment on lines +236 to +241
* @param {Object} params
* @param {CreateSubmissionDto} params.submissionDto - 코드 제출 DTO
* @param {string} params.userIp - 사용자의 IP 주소
* @param {number} params.userId - 제출을 수행하는 사용자의 ID
* @param {number} params.problemId - 제출할 문제의 ID
* @param {number} params.assignmentId - 문제가 속한 과제의 ID
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

params는 머에요?? 전체 Parameter를 params로 해놓은건가요

if (
submission.userId !== userId &&
userRole !== Role.Admin &&
userRole !== Role.SuperAdmin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

??

const isAdmin = await this.prisma.user.findFirst({
where: {
id: userId,
role: 'Admin'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이상하네

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants