Bosu - Finish Analytics Dashboard Integration - Backend - #2349
Open
BosuBose132 wants to merge 6 commits into
Open
Bosu - Finish Analytics Dashboard Integration - Backend#2349BosuBose132 wants to merge 6 commits into
BosuBose132 wants to merge 6 commits into
Conversation
…docs Addresses PR review: GET /api/analytics/student/:studentId was growing the studentMetrics collection on each call. Without a unique index the findOneAndUpdate upsert could insert duplicate documents for the same student. A unique index guarantees exactly one metrics doc per student, so repeated GET requests update in place instead of adding rows. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…tics-integration-backend # Conflicts: # package-lock.json # src/startup/routes.js
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Description
This PR completes and takes over the unfinished Analytics Dashboard backend work from PR #1917.
Original PR:
#1917
Related Frontend:
#4482
Main Changes
Endpoints
Overview
GET
/api/analytics/overviewOptional query parameters:
studentIdclassIdstartDateendDateStudent Metrics
GET
/api/analytics/student/:studentIdExplicit Refresh
POST
/api/analytics/student/:studentId/refreshTesting
git diff --checkpassedManual Verification
Verified locally that:
Important Local Testing Note
npm startruns the compiled backend fromdist.After backend source changes, run: