Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add streaksList endpoint #3255

Merged
merged 1 commit into from
Jul 17, 2023
Merged

feat: add streaksList endpoint #3255

merged 1 commit into from
Jul 17, 2023

Conversation

bigint
Copy link
Member

@bigint bigint commented Jul 17, 2023

What does this PR do?

πŸ€– Generated by Copilot at 8e12679

This pull request adds a new feature to the achievements worker that enables fetching the streak data for a specific date. It also renames and refactors some files and functions to improve code quality.

Related issues

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Enhancement (non-breaking small changes to existing functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Explanation of the changes

πŸ€– Generated by Copilot at 8e12679

  • Add and rename handler functions for streaks endpoints (link, link, link)
  • Create a new handler function streaksList in streaksList.ts that queries the events table and returns a list of events for a given user and date (link)
  • Rename the existing handler function streaks to streaksCalendar in streaksCalendar.ts to clarify its purpose of returning a calendar view of streaks for a given user (link)
  • Update the imports in index.ts to reflect the new and renamed handler functions (link)
  • Add and update routes for streaks endpoints (link)
    • Add a new route /streaks/:id/:date that calls the streaksList handler function with the user id and date parameters (link)
    • Update the existing route /streaks/:id to call the streaksCalendar handler function with the user id parameter (link)

Emoji

πŸ†•πŸ—„οΈπŸ†

@vercel
Copy link

vercel bot commented Jul 17, 2023

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Updated (UTC)
prerender βœ… Ready (Inspect) Visit Preview Jul 17, 2023 2:51pm
web βœ… Ready (Inspect) Visit Preview Jul 17, 2023 2:51pm

@bigint bigint enabled auto-merge (squash) July 17, 2023 14:49
@vercel vercel bot temporarily deployed to Preview – prerender July 17, 2023 14:50 Inactive
@bigint bigint disabled auto-merge July 17, 2023 14:51
@bigint bigint merged commit f7776e4 into main Jul 17, 2023
7 of 8 checks passed
@bigint bigint deleted the add-streaksList branch July 17, 2023 14:51
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.

None yet

1 participant