Skip to content

fix: deprecated code in new credential sync endpoints#14116

Merged
zomars merged 2 commits intomainfrom
fix/deprecated-prisma-in-credential-sync
Mar 16, 2024
Merged

fix: deprecated code in new credential sync endpoints#14116
zomars merged 2 commits intomainfrom
fix/deprecated-prisma-in-credential-sync

Conversation

@zomars
Copy link
Copy Markdown
Contributor

@zomars zomars commented Mar 16, 2024

What does this PR do?

Fixes #14115

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How should this be tested?

  • yarn build --filter=@calcom/api

Mandatory Tasks

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

@graphite-app graphite-app Bot requested a review from a team March 16, 2024 17:33
@zomars zomars requested review from joeauyeung and removed request for a team March 16, 2024 17:33
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 16, 2024

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

@github-actions github-actions Bot added High priority Created by Linear-GitHub Sync 🐛 bug Something isn't working 🚧 wip / in the making labels Mar 16, 2024
@keithwillcode keithwillcode added api area: API, enterprise API, access token, OAuth core area: core, team members only foundation labels Mar 16, 2024
@zomars zomars requested a review from emrysal March 16, 2024 17:33
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 16, 2024

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

4 Ignored Deployments
Name Status Preview Comments Updated (UTC)
ai ⬜️ Ignored (Inspect) Visit Preview Mar 16, 2024 6:42pm
cal ⬜️ Ignored (Inspect) Visit Preview Mar 16, 2024 6:42pm
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Mar 16, 2024 6:42pm
qa ⬜️ Ignored (Inspect) Visit Preview Mar 16, 2024 6:42pm

@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented Mar 16, 2024

Graphite Automations

"Add foundation team as reviewer" took an action on this PR • (03/16/24)

1 reviewer was added to this PR based on Keith Williams's automation.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 16, 2024

📦 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 Mar 16, 2024

Current Playwright Test Results Summary

✅ 303 Passing - ⚠️ 1 Flaky

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

(Last updated on 03/16/2024 07:00:45pm UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: aa5339f

Started: 03/16/2024 06:51:13pm UTC

⚠️ Flakes

📄   apps/web/playwright/organization/across-org/across-org.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
user1NotMemberOfOrg1 is part of team1MemberOfOrg1 EventTypes listing should show correct link for user events and team1MemberOfOrg1's events
Retry 1Initial Attempt
2.75% (5) 5 / 182 runs
failed over last 7 days
6.04% (11) 11 / 182 runs
flaked over last 7 days

View Detailed Build Results


Copy link
Copy Markdown
Contributor Author

@zomars zomars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self review done

const { userId: reqUserId, credentialId: reqCredentialId } = schemaCredentialDeleteParams.parse(req.query);

const userId = parseInt(reqUserId);
const credentialId = parseInt(reqCredentialId);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The schema already returns as number.

Comment on lines +100 to +101
// createdcredential.user.email;
// TODO: ^ Investigate why this select doesn't work.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joeauyeung Found some odd behavior in here. Seems like using a select or include in here doesn't actually returns the correct types. Tried replicating in other files and on a new repo with no luck. Also tried upgrading prisma to discard a possible bug but still didn't work. I had to create and find in two queries as a workaround.

Copy link
Copy Markdown
Member

@alishaz-polymath alishaz-polymath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zomars zomars merged commit a305550 into main Mar 16, 2024
@zomars zomars deleted the fix/deprecated-prisma-in-credential-sync branch March 16, 2024 19:26
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 🐛 bug Something isn't working core area: core, team members only foundation High priority Created by Linear-GitHub Sync

Projects

None yet

Development

Successfully merging this pull request may close these issues.

API builds failing on main

3 participants