* Base UI work * Bulk invite users * WIP workspace oauth implementation * Seperate components - add existing gcal check * Move callback session to getServerSession * Implementation of state redirect back to teams on login * Add callback to populate text field * Change error message * Redirect from callback and open modal * Fix bulk translations * Fix translations for google button * Delete Query * Feature flag this * Update packages/trpc/server/routers/viewer/teams/inviteMember.handler.ts * Check if Gcal in installed globally * Add new router * Add missing [trpc] route * Feedback * Update packages/trpc/server/routers/viewer/googleWorkspace/googleWorkspace.handler.ts * Typefixes * More typefixes --------- Co-authored-by: Hariom Balhara <hariombalhara@gmail.com> Co-authored-by: zomars <zomars@me.com>
22 lines
535 B
TypeScript
22 lines
535 B
TypeScript
import { prisma } from "@calcom/prisma";
|
|
|
|
import type { TrpcSessionUser } from "../../../trpc";
|
|
import type { CheckGlobalKeysSchemaType } from "./checkGlobalKeys.schema";
|
|
|
|
type checkForGlobalKeys = {
|
|
ctx: {
|
|
user: NonNullable<TrpcSessionUser>;
|
|
};
|
|
input: CheckGlobalKeysSchemaType;
|
|
};
|
|
|
|
export const checkForGlobalKeysHandler = async ({ ctx, input }: checkForGlobalKeys) => {
|
|
const appIsGloballyInstalled = await prisma.app.findUnique({
|
|
where: {
|
|
slug: input.slug,
|
|
},
|
|
});
|
|
|
|
return !!appIsGloballyInstalled;
|
|
};
|