* deployment * update imports * booking report * update import paths * watch list * watch list * api key * api key * selected slots * wip * event type translation * work flow step * booking reference * fix tests * fix * fix * migrate * wip * address * fix
16 lines
491 B
TypeScript
16 lines
491 B
TypeScript
import { PrismaApiKeyRepository } from "@calcom/features/ee/api-keys/repositories/PrismaApiKeyRepository";
|
|
import type { PrismaClient } from "@calcom/prisma";
|
|
|
|
import type { TrpcSessionUser } from "../../../types";
|
|
|
|
type ListOptions = {
|
|
ctx: {
|
|
user: NonNullable<TrpcSessionUser>;
|
|
prisma: PrismaClient;
|
|
};
|
|
};
|
|
|
|
export const listHandler = async ({ ctx: { user, prisma } }: ListOptions) => {
|
|
return new PrismaApiKeyRepository(prisma).findApiKeysFromUserId({ userId: user.id });
|
|
};
|