Skip to content

fix: Event-types API endpoint Admin POST works with either userId or teamId#12175

Merged
emrysal merged 2 commits intomainfrom
fix/admin-api-eventtype-teamid-or-userid
Nov 2, 2023
Merged

fix: Event-types API endpoint Admin POST works with either userId or teamId#12175
emrysal merged 2 commits intomainfrom
fix/admin-api-eventtype-teamid-or-userid

Conversation

@alishaz-polymath
Copy link
Copy Markdown
Member

What does this PR do?

Currently, userId is required to be passed in when an admin is creating an event type via the API. If we try to create a team event type which shouldn't require a userId, it should go through if teamId is provided

Requirement/Documentation

  • NA

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Chore (refactoring code, technical debt, workflow improvements)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How should this be tested?

  • API POST call for a team event type by Admin should now go through, which earlier would return an error.

Mandatory Tasks

  • Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.

Checklist

  • I haven't read the contributing guide
  • My code doesn't follow the style guidelines of this project
  • I haven't commented my code, particularly in hard-to-understand areas
  • I haven't checked if my PR needs changes to the documentation
  • I haven't checked if my changes generate no new warnings
  • I haven't added tests that prove my fix is effective or that my feature works
  • I haven't checked if new and existing unit tests pass locally with my changes

@vercel
Copy link
Copy Markdown

vercel Bot commented Nov 1, 2023

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

Name Status Preview Comments Updated (UTC)
api ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 2, 2023 9:48am
dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 2, 2023 9:48am
5 Ignored Deployments
Name Status Preview Comments Updated (UTC)
ai ⬜️ Ignored (Inspect) Visit Preview Nov 2, 2023 9:48am
cal ⬜️ Ignored (Inspect) Visit Preview Nov 2, 2023 9:48am
cal-demo ⬜️ Ignored (Inspect) Nov 2, 2023 9:48am
qa ⬜️ Ignored (Inspect) Visit Preview Nov 2, 2023 9:48am
ui ⬜️ Ignored (Inspect) Visit Preview Nov 2, 2023 9:48am

@alishaz-polymath alishaz-polymath added the api area: API, enterprise API, access token, OAuth label Nov 1, 2023
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Nov 1, 2023

Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link to collect XP and win prizes!

@zomars zomars added the core area: core, team members only label Nov 1, 2023
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Nov 1, 2023

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@deploysentinel
Copy link
Copy Markdown

deploysentinel Bot commented Nov 1, 2023

Current Playwright Test Results Summary

✅ 251 Passing - ⚠️ 4 Flaky

Run may still be in progress, this comment will be updated as current testing workflow or job completes...

(Last updated on 11/02/2023 09:53:32am UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: 1bba09f

Started: 11/02/2023 09:49:34am UTC

⚠️ Flakes

📄   packages/embeds/embed-core/playwright/tests/action-based.e2e.ts • 2 Flakes

Top 1 Common Error Messages

null

2 Test Cases Affected

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Popup Tests should be able to reschedule
Retry 1Initial Attempt
20.43% (57) 57 / 279 runs
failed over last 7 days
76.34% (213) 213 / 279 runs
flaked over last 7 days
Popup Tests Floating Button Popup Pro User - Configured in App with default setting of system theme should open embed iframe according to system theme when no theme is configured through Embed API
Retry 1Initial Attempt
2.88% (8) 8 / 278 runs
failed over last 7 days
58.27% (162) 162 / 278 runs
flaked over last 7 days

📄   apps/web/playwright/event-types.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Event Types tests user Different Locations Tests Can add Cal video location and book with it
Retry 1Initial Attempt
0.39% (1) 1 / 258 run
failed over last 7 days
3.88% (10) 10 / 258 runs
flaked over last 7 days

📄   apps/web/playwright/webhook.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
FORM_SUBMITTED on submitting team form, triggers team webhook
Retry 1Initial Attempt
0.78% (2) 2 / 257 runs
failed over last 7 days
14.40% (37) 37 / 257 runs
flaked over last 7 days

View Detailed Build Results


@alishaz-polymath alishaz-polymath requested a review from a team November 1, 2023 11:31
@emrysal emrysal merged commit d4d96eb into main Nov 2, 2023
@emrysal emrysal deleted the fix/admin-api-eventtype-teamid-or-userid branch November 2, 2023 12:29
zomars pushed a commit that referenced this pull request Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api area: API, enterprise API, access token, OAuth core area: core, team members only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants