-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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: organizations teams endpoints apiv2 #15586
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Ignored Deployments
|
Graphite Automations"Add foundation team as reviewer" took an action on this PR • (06/27/24)1 reviewer was added to this PR based on Keith Williams's automation. "Add platform team as reviewer" took an action on this PR • (06/27/24)1 reviewer was added to this PR based on Keith Williams's automation. |
apps/api/v2/src/modules/organizations/controllers/organizations-teams.controller.ts
Outdated
Show resolved
Hide resolved
apps/api/v2/src/modules/organizations/controllers/organizations-teams.controller.ts
Outdated
Show resolved
Hide resolved
apps/api/v2/src/modules/organizations/inputs/create-organization-team.input.ts
Outdated
Show resolved
Hide resolved
apps/api/v2/src/modules/organizations/inputs/create-organization-team.input.ts
Show resolved
Hide resolved
apps/api/v2/src/modules/organizations/inputs/create-organization-team.input.ts
Outdated
Show resolved
Hide resolved
📦 Next.js Bundle Analysis for @calcom/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 Twelve Pages Changed SizeThe following pages changed size from the code in this PR compared to its base branch:
DetailsOnly the gzipped size is provided here based on an expert tip. First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If Any third party scripts you have added directly to your app using the The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored. |
merging as it is not related to failing e2e |
* feat: organizations teams endpoints apiv2 * fixup! Merge branch 'main' into feat-api-v2-org-teams-endpoints * chore: add roles guard to endpoints * add tests * fixup! Merge branch 'main' into feat-api-v2-org-teams-endpoints * fixup! fixup! Merge branch 'main' into feat-api-v2-org-teams-endpoints * fixup! fixup! fixup! Merge branch 'main' into feat-api-v2-org-teams-endpoints
What does this PR do?
/organizations/:orgId/teams/:teamid - isOrganizationGuard- (maybe team owners)
GET - RolesGuard (ADMIN) - Get all teams within the organization
POST - RolesGuard (ADMIN) - Create a team within the organization (The key here would be to ensure the slug uniqueness check is local to the organization and not system wide)
PATCH - RolesGuard (ADMIN) - Can only patch a team that is part of the organization
DELETE - RolesGuard (ADMIN) - Can only delete a team already part of the organization
All the prisma calls to fetch / create / delete / patch the teams, should use the orgId provided in the request url, in the parentId field of the team
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
yarn test:e2e organizations-teams.controller.e2e-spec.ts