-
-
Notifications
You must be signed in to change notification settings - Fork 115
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(api): Add endpoint to fetch all workspace invitations for a user #586
feat(api): Add endpoint to fetch all workspace invitations for a user #586
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
Something fishy with the api e2e tests. I pushed the changes only after testing it locally. |
Related to #550 |
Any idea how to get the invitationDate? The WorkSpaceMember Table has no Date property |
You can add an |
…vitation when workspace ownership is transferred
I added createdOn in the WorkspaceMember model, as I felt admin entries should not have invitedOn. |
@muntaxir4 can you please add the bruno docs aswell? |
User description
Description
Created an endpoint /invitations under workspace to retrieve all unaccepted invitations. Three E2E Tests were also added.
Fixes #550
Fixes #551
Developer's checklist
If changes are made in the code:
Documentation Update
PR Type
Enhancement, Tests
Description
/invitations
to fetch all workspace invitations for a user, with support for pagination and filtering by acceptance status.getInvitationsOfUser
method in theWorkspaceService
to handle the logic for fetching and paginating invitations.Changes walkthrough 📝
workspace.controller.ts
Add endpoint to fetch workspace invitations
apps/api/src/workspace/controller/workspace.controller.ts
GET /invitations
to fetch workspace invitations.workspace.service.ts
Implement service method for fetching user invitations
apps/api/src/workspace/service/workspace.service.ts
getInvitationsOfUser
method to fetch user invitations.workspace.e2e.spec.ts
Add E2E tests for workspace invitations endpoint
apps/api/src/workspace/workspace.e2e.spec.ts