From 6dad178ccfa6f175d1758934f6443b61255a7ad5 Mon Sep 17 00:00:00 2001 From: Aryan Kumar Date: Sat, 28 Oct 2023 18:54:39 +0530 Subject: [PATCH] update: idk --- .gitignore | 5 ++++- api/updateLeaderboard.py | 2 -- frontend/src/components/Leaderboard/Leaderboard.js | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 3eb0255..bfbf78c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,7 @@ tests api/venv api/aws api/test.py -api/data.txt \ No newline at end of file +api/data.txt +# Local Netlify folder +**/.netlify +**/.vscode \ No newline at end of file diff --git a/api/updateLeaderboard.py b/api/updateLeaderboard.py index c231e42..b8cfd7a 100644 --- a/api/updateLeaderboard.py +++ b/api/updateLeaderboard.py @@ -10,8 +10,6 @@ def getLeaderboard(): ProjectionExpression='userid, userName, totalBadges, lastBadgeCompletedOn', ) response = response['Items'] - # sort by totalBadges and then by completedAllAt - print("sorting now") response = sorted(response, key=lambda i: (i['totalBadges'], -i['lastBadgeCompletedOn']), reverse=True) for i in range(len(response)): diff --git a/frontend/src/components/Leaderboard/Leaderboard.js b/frontend/src/components/Leaderboard/Leaderboard.js index 5f6a3f8..e01aae6 100644 --- a/frontend/src/components/Leaderboard/Leaderboard.js +++ b/frontend/src/components/Leaderboard/Leaderboard.js @@ -5,7 +5,7 @@ import axios from "axios"; const loadLeaderboard = async () => { try { - var rawLeaderboard = await axios.get('https://csjprogress.s3.ap-south-1.amazonaws.com/leaderboard.json'); + var rawLeaderboard = await axios.get('https://dro7t3x3dwegt.cloudfront.net/leaderboard.json'); } catch(err) { console.error('Couldn\'t load leaderboard.') return []