fix(api): skip platform org subdomain in bookingUrl for API v2 (#26812)

Platform organizations don't have public-facing subdomains, so non-managed
users in platform orgs should get cal.com URLs instead of the platform
org subdomain.

- Updated EventTypeUser type to include isPlatform field
- Modified buildBookingUrl to check isPlatform before using org slug
- Added unit test for platform org users

Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
This commit is contained in:
Dhairyashil ShindeandMorgan authored and GitHub committed 2026-01-14 09:04:45 +00:00
1 parent 3860717ae3
commit 821dce6a04
3 files changed
+63 -20

No files matched your search

+30 -18
View File
@@ -2936,7 +2936,9 @@
"watchlist.create",
"watchlist.read",
"watchlist.update",
"watchlist.delete"
"watchlist.delete",
"featureOptIn.read",
"featureOptIn.update"
]
}
}
@@ -6659,7 +6661,9 @@
"webhook.create",
"webhook.read",
"webhook.update",
"webhook.delete"
"webhook.delete",
"featureOptIn.read",
"featureOptIn.update"
]
}
}
@@ -29645,7 +29649,9 @@
"watchlist.create",
"watchlist.read",
"watchlist.update",
"watchlist.delete"
"watchlist.delete",
"featureOptIn.read",
"featureOptIn.update"
]
}
},
@@ -29758,7 +29764,9 @@
"watchlist.create",
"watchlist.read",
"watchlist.update",
"watchlist.delete"
"watchlist.delete",
"featureOptIn.read",
"featureOptIn.update"
]
}
},
@@ -29920,7 +29928,9 @@
"watchlist.create",
"watchlist.read",
"watchlist.update",
"watchlist.delete"
"watchlist.delete",
"featureOptIn.read",
"featureOptIn.update"
]
}
},
@@ -30039,7 +30049,9 @@
"watchlist.create",
"watchlist.read",
"watchlist.update",
"watchlist.delete"
"watchlist.delete",
"featureOptIn.read",
"featureOptIn.update"
]
}
}
@@ -30123,7 +30135,9 @@
"webhook.create",
"webhook.read",
"webhook.update",
"webhook.delete"
"webhook.delete",
"featureOptIn.read",
"featureOptIn.update"
]
}
},
@@ -30215,7 +30229,9 @@
"webhook.create",
"webhook.read",
"webhook.update",
"webhook.delete"
"webhook.delete",
"featureOptIn.read",
"featureOptIn.update"
]
}
},
@@ -30356,7 +30372,9 @@
"webhook.create",
"webhook.read",
"webhook.update",
"webhook.delete"
"webhook.delete",
"featureOptIn.read",
"featureOptIn.update"
]
}
},
@@ -30454,7 +30472,9 @@
"webhook.create",
"webhook.read",
"webhook.update",
"webhook.delete"
"webhook.delete",
"featureOptIn.read",
"featureOptIn.update"
]
}
}
@@ -33058,10 +33078,6 @@
"error"
]
},
"message": {
"type": "string",
"example": "This endpoint will require authentication in a future release."
},
"error": {
"type": "object"
},
@@ -33098,10 +33114,6 @@
"type": "string"
}
},
"message": {
"type": "string",
"example": "This endpoint will require authentication in a future release."
},
"error": {
"type": "object"
}