Skip to content

Conversation

@DylanDevelops
Copy link
Owner

This pull request includes changes to the convex/users.ts and convex/schema.ts files to update the handling of user streaks and daily challenge completions. The changes focus on improving the clarity of the code and documentation, as well as updating the schema to reflect these changes.

Schema updates:

  • Removed lastPlayedTimestamp from the schema and replaced it with lastDailyChallengeCompletion to better represent the purpose of the field.

Code documentation and functionality improvements:

  • Updated the documentation for the finishDailyChallenge mutation to provide clearer descriptions and added missing annotations.
  • Refactored the finishDailyChallenge mutation to store the current timestamp in a variable before updating the database.
  • Updated the updateStreak mutation to use lastDailyChallengeCompletion instead of lastPlayedTimestamp, and improved the documentation for better clarity. [1] [2] [3]
  • Modified the resetInactiveStreaks mutation to filter users based on lastDailyChallengeCompletion and updated the documentation accordingly.

@divinewton divinewton merged commit d0580e8 into main Apr 10, 2025
4 checks passed
@divinewton divinewton deleted the streak-incremenent-fix branch April 10, 2025 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants