Skip to content

Commit

Permalink
Merge pull request #2280 from gtech-mulearn/dev
Browse files Browse the repository at this point in the history
fix(leaderboard): student monthly leaderboard api
  • Loading branch information
aswanthabam authored Jan 4, 2025
2 parents 9959ff2 + ee0a09d commit 6583d5a
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions api/leaderboard/leaderboard_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,10 @@ def get(self, request):
)
.order_by("-total_karma")[:20]
)
data = [
{
"full_name": student.full_name,
"total_karma": student.total_karma,
"institution": student.institution,
}
for student in student_monthly_leaderboard
]

return CustomResponse(response=data).get_success_response()
return CustomResponse(
response=student_monthly_leaderboard
).get_success_response()


class CollegeLeaderboard(APIView):
Expand Down

0 comments on commit 6583d5a

Please sign in to comment.