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 joinOrLeave community endpoint #3286

Merged
merged 1 commit into from
Jul 21, 2023
Merged

feat: add joinOrLeave community endpoint #3286

merged 1 commit into from
Jul 21, 2023

Conversation

bigint
Copy link
Member

@bigint bigint commented Jul 21, 2023

What does this PR do?

🤖 Generated by Copilot at d6848c6

Renamed and refactored the joinCommunity handler and endpoint to joinOrLeaveCommunity and /joinOrLeave in the communities worker package. This allows users to join or leave a community with a single request and simplifies the API.

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 d6848c6

  • Simplify the API for joining and leaving communities by using a single handler and endpoint (link, link, link)
  • Rename the joinCommunity handler to joinOrLeaveCommunity and modify it to check the user's membership status and perform the appropriate database operation (link)
  • Rename the joinCommunity module to joinOrLeaveCommunity and update the import statement in index.ts (link)
  • Rename the /join endpoint to /joinOrLeave and update the router in index.ts (link)

Emoji

🔀🔄🚪

@vercel
Copy link

vercel bot commented Jul 21, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
prerender ✅ Ready (Inspect) Visit Preview Jul 21, 2023 11:09am
web ✅ Ready (Inspect) Visit Preview Jul 21, 2023 11:09am

@bigint bigint merged commit 9572156 into main Jul 21, 2023
4 checks passed
@bigint bigint deleted the toggle-join branch July 21, 2023 11:08
@vercel vercel bot temporarily deployed to Preview – prerender July 21, 2023 11:09 Inactive
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.

1 participant