Skip to content

Commit

Permalink
fix(leaderboard): student monthly leaderboard api
Browse files Browse the repository at this point in the history
  • Loading branch information
aswanthabam committed Jan 4, 2025
1 parent 30aec82 commit ee0a09d
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 ee0a09d

Please sign in to comment.