84bc330fa8
* feat: rename repository files to include Repository suffix - Rename apiKey.ts to apiKeyRepository.ts - Rename assignmentReason.ts to assignmentReasonRepository.ts - Update all import statements to use new file names Co-Authored-By: eunjae@cal.com <hey@eunjae.dev> * feat: rename repository files to PrismaRepository with Prisma prefix - Rename apiKeyRepository.ts to PrismaApiKeyRepository.ts - Rename assignmentReasonRepository.ts to PrismaAssignmentReasonRepository.ts - Update class names to PrismaApiKeyRepository and PrismaAssignmentReasonRepository - Update all import statements and usages across 3 files Co-Authored-By: eunjae@cal.com <hey@eunjae.dev> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
14 lines
375 B
TypeScript
14 lines
375 B
TypeScript
import { PrismaApiKeyRepository } from "@calcom/lib/server/repository/PrismaApiKeyRepository";
|
|
|
|
import type { TrpcSessionUser } from "../../../types";
|
|
|
|
type ListOptions = {
|
|
ctx: {
|
|
user: NonNullable<TrpcSessionUser>;
|
|
};
|
|
};
|
|
|
|
export const listHandler = async ({ ctx }: ListOptions) => {
|
|
return PrismaApiKeyRepository.findApiKeysFromUserId({ userId: ctx.user.id });
|
|
};
|