issues
search
DSC-McMaster-U
/
Gamified-Learning-Platform
MIT License
6
stars
14
forks
source link
API Endpoint for Retrieving Leaderboard Data
#104
Closed
racheldennis
closed
8 months ago
racheldennis
commented
9 months ago
Changes Made:
Created a new route in the Flask app to handle GET requests for retrieving leaderboard data.
Implemented logic to fetch and return a sorted list of users based on leaderboard criteria.
Implemented pagination in the response to handle many users efficiently.
Details:
Added a new route
'/leaderboard'
in
app.py
to handle GET requests for leaderboard data.
Implemented sorting logic to retrieve users based on specific criteria (e.g., score) in
app.py
.
Implemented pagination logic to efficiently handle large datasets in the response.
Modified
dashboard.html
to display leaderboard data fetched from the API endpoint.
Ensured the leaderboard was correctly displayed with pagination controls and relevant user information.
Testing:
Having difficulty testing the
dashboard.html
to see if API is incorporated correctly due to difficulties with running Flask
Notes:
Please review and provide feedback on the implementation of the new leaderboard API endpoint and its integration with the dashboard.
Also, review if the pagination mechanism is working as expected and can efficiently handle a large number of users.
Any suggestions for further improvements or enhancements are welcome.
Shows there are other changes to files. This is only due to syncing files to my current repository.
Changes Made:
Details:
'/leaderboard'
inapp.py
to handle GET requests for leaderboard data.app.py
.dashboard.html
to display leaderboard data fetched from the API endpoint.Testing:
dashboard.html
to see if API is incorporated correctly due to difficulties with running FlaskNotes: