Skip to content

Commit

Permalink
chore(be): rename sort key for contest submission (#2324)
Browse files Browse the repository at this point in the history
chore(be): rename sortKey
  • Loading branch information
Jaehyeon1020 authored Jan 22, 2025
1 parent 4595bb6 commit 9829d09
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/backend/apps/admin/src/submission/submission.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export class SubmissionService {
getOrderBy(
order: ContestSubmissionOrder
): Prisma.SubmissionOrderByWithRelationInput {
const [attr, value] = order.split('-')
const [sortKey, sortOrder] = order.split('-')

switch (order) {
case ContestSubmissionOrder.studentIdASC:
Expand All @@ -100,15 +100,15 @@ export class SubmissionService {
case ContestSubmissionOrder.usernameDESC:
return {
user: {
[attr]: value
[sortKey]: sortOrder
}
}
case ContestSubmissionOrder.realNameASC:
case ContestSubmissionOrder.realNameDESC:
return {
user: {
userProfile: {
[attr]: value
[sortKey]: sortOrder
}
}
}
Expand Down

0 comments on commit 9829d09

Please sign in to comment.