Files
calendar/packages/trpc/server/routers/viewer/apps/setDefaultConferencingApp.handler.ts
T
caf7943c91 fix: set conferencing apps as default (#15376)
* fix: set conferencing apps as default

* fix in other oauth conferencing apps

* creating default event-types should set the user's default location

* Update getDefaultLocations.ts

* fix: unit test

* default install only for first oauth app

* fix: type-check

* update default on success

* fix: pass callback prop

* chore: code cleanup

* Fix condition

* no longer needed

- as we reverted https://github.com/calcom/cal.com/commit/20fdb50081ae684723a5af78436068c0b09509a4

---------

Co-authored-by: Somay Chauhan <somaychauhan98@gmail.com>
Co-authored-by: Hariom <hariombalhara@gmail.com>
2024-07-10 11:00:59 +00:00

16 lines
563 B
TypeScript

import setDefaultConferencingApp from "@calcom/app-store/_utils/setDefaultConferencingApp";
import type { TrpcSessionUser } from "../../../trpc";
import type { TSetDefaultConferencingAppSchema } from "./setDefaultConferencingApp.schema";
type SetDefaultConferencingAppOptions = {
ctx: {
user: NonNullable<TrpcSessionUser>;
};
input: TSetDefaultConferencingAppSchema;
};
export const setDefaultConferencingAppHandler = async ({ ctx, input }: SetDefaultConferencingAppOptions) => {
return await setDefaultConferencingApp(ctx.user.id, input.slug);
};