Skip to content

chore: migrate api/cancel to App Router#19074

Merged
emrysal merged 5 commits intomainfrom
chore/migrate-api-cancel
Feb 6, 2025
Merged

chore: migrate api/cancel to App Router#19074
emrysal merged 5 commits intomainfrom
chore/migrate-api-cancel

Conversation

@hbjORbj
Copy link
Copy Markdown
Contributor

@hbjORbj hbjORbj commented Feb 4, 2025

What does this PR do?

  • Migrates /api/cancel.ts to App Router

Tested

Screenshot 2025-02-04 at 2 32 25 AM Screenshot 2025-02-04 at 2 32 29 AM

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • N/A - I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  • Make a booking and cancel (inspect the Network tab to see /api/cancel request)

@graphite-app graphite-app Bot requested a review from a team February 4, 2025 07:40
@keithwillcode keithwillcode added consumer core area: core, team members only labels Feb 4, 2025
@hbjORbj hbjORbj added high-risk Requires approval by Foundation team and removed core area: core, team members only consumer labels Feb 4, 2025
@graphite-app graphite-app Bot requested a review from a team February 4, 2025 07:41
@dosubot dosubot Bot added api area: API, enterprise API, access token, OAuth bookings area: bookings, availability, timezones, double booking labels Feb 4, 2025
@hbjORbj hbjORbj added consumer and removed bookings area: bookings, availability, timezones, double booking labels Feb 4, 2025
@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 4, 2025

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

Name Status Preview Comments Updated (UTC)
cal-com-ui-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 4, 2025 7:04pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Feb 4, 2025 7:04pm
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Feb 4, 2025 7:04pm

@keithwillcode keithwillcode added the core area: core, team members only label Feb 4, 2025
@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented Feb 4, 2025

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (02/04/25)

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

"Add foundation team as reviewer" took an action on this PR • (02/04/25)

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 4, 2025

E2E results are ready!

return NextResponse.json(result, { status: statusCode });
}

export async function DELETE(req: NextRequest) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

NIT, but I like this pattern:

Suggested change
export async function DELETE(req: NextRequest) {
export {
handler as DELETE,
handler as POST
};

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.

will address it in #19146

Copy link
Copy Markdown
Contributor

@emrysal emrysal left a comment

Choose a reason for hiding this comment

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

Very minor NIT, non-blocking, just for future ref.

@emrysal emrysal merged commit e889015 into main Feb 6, 2025
@emrysal emrysal deleted the chore/migrate-api-cancel branch February 6, 2025 23:16
MuhammadAimanSulaiman pushed a commit to hit-pay/cal.com that referenced this pull request Feb 25, 2025
* Add app/api/cancel/route.ts

* remove pages router api/cancel

* refactors needed

* refactor
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 consumer core area: core, team members only high-risk Requires approval by Foundation team ready-for-e2e

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants