feat(be): apply sorting on admin get-contest-submissions api #2183
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.
Description
Closes TAS-1009
Contest Overall 페이지의 "Participants" 탭의 테이블에서 사용하는 admin Get Contest Submissions API에 정렬 기능을 추가합니다.
기존에는 API에서 정렬 기능을 구현하지 않아, 프론트단에서 자체적으로 구현해 사용중이었습니다. 그러나 데이터가 많아지면서 한번에 모든 데이터를 fetching하기 어려운 문제가 발생해 정렬된 데이터에 pagination이 가능하도록 하기 위해 해당 기능을 구현합니다.
정렬 기준은 다음과 같습니다.
studentId-asc
: 학번 오름차순 정렬studentId-desc
: 학번 내림차순 정렬realName-asc
: 학생이름 오름차순 정렬realName-desc
: 학생이름 내림차순 정렬username-asc
: username 오름차순 정렬username-desc
: username 내림차순 정렬Additional context
Before submitting the PR, please make sure you do the following
fixes #123
).