Changed user_points POST route logic that now allows for user points to accumulate over time rather than resetting with each new score.
Changes made:
Altered the user points update mechanism to increment existing points instead of overwriting them. This ensures that users can accumulate points as they progress through different educational modules.
Added checks to create a new Points object associated with the user if one does not already exist.
Ensured that any addition of points is committed to the database, preserving user progress.
Assumptions:
Increment the user points by 100
Note: I was unsure if I had to change anything in the front-end to retrieve point updates from the educational modules.
Changed user_points POST route logic that now allows for user points to accumulate over time rather than resetting with each new score.
Changes made:
Assumptions:
Note: I was unsure if I had to change anything in the front-end to retrieve point updates from the educational modules.