2
0
Files

25 lines
494 B
TypeScript
Raw Permalink Normal View History

2024-08-09 00:39:27 +02:00
import { prisma } from "@calcom/prisma";
import type { TGetClientInputSchema } from "./getClient.schema";
type GetClientOptions = {
input: TGetClientInputSchema;
};
export const getClientHandler = async ({ input }: GetClientOptions) => {
const { clientId } = input;
const client = await prisma.oAuthClient.findFirst({
where: {
clientId,
},
select: {
clientId: true,
redirectUri: true,
name: true,
logo: true,
},
});
return client;
};