[CAL-3699] respect the user default user location when creating event type via API v1
milospuac opened this issue · comments
From SyncLinear.com | CAL-3699
To address the issue CAL-3699 and ensure the user's default location is respected when creating an event type via API v1, you should use the defaultValueVariable
property. This property should be set to reflect the user's default setting, such as hostDefault
for the user's default conferencing app. Here's an example for setting up an event type with the user's default conferencing app:
{
default: true,
type: DefaultEventLocationTypeEnum.Conferencing,
iconUrl: "/link.svg",
organizerInputType: null,
label: "organizer_default_conferencing_app",
variable: "hostDefault",
defaultValueVariable: "hostDefault",
category: "conferencing",
messageForOrganizer: "",
}
Make sure the defaultValueVariable
matches the user's default preference you want to apply. This ensures the API respects the user's default location settings when creating or updating event types. For more detailed implementation, refer to the source code.
Details
Sources
- packages/app-store/locations.ts
- apps/api/v1/pages/api/event-types/_post.ts
- apps/api/v1/test/lib/bookings/_post.test.ts
- apps/api/v1/lib/helpers/withMiddleware.ts
- packages/platform/constants/api.ts
- apps/web/modules/event-types/views/event-types-single-view.tsx
About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
To continue the conversation, mention @dosu.