What does this PR do?

Added a new API route to get the event-types using the slug .

Closes #12411 /claim #12411

Rationale for Introducing a New API Route

There were two options: either to update the existing /event-types/{id} route to /event-types/{idOrSlug} or to add a new route /event-types/bySlug/{slug}. I chose to add a new route as updating the existing one to /event-types/{idOrSlug} would make it ambiguous whether the event-type is fetched using slug or the id.

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update (need to update API docs here )

How should this be tested?

  • Try to get the event-types using API /event-types/bySlug/{slug}
  • If a valid API key is passed and event-type with the slug exists for the user, it should be returned; otherwise forbidden.

Mandatory Tasks

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

Checklist

All done

Claim

Total prize pool $20
Total paid $20
Status Approved
Submitted January 23, 2024
Last updated February 02, 2024

Contributors

AB

Abhijeet Singh

@abhijeetsingh-22

100%

Sponsors

CA

Cal.com, Inc.

@cal

$20 paid