* fix trpc session circle dep * fixes trpc session cirlce dep * fix relative imports * fix more imports to use types and not trpc * fix exports * Fixed types --------- Co-authored-by: Keith Williams <keithwillcode@gmail.com>
19 lines
627 B
TypeScript
19 lines
627 B
TypeScript
import handleDeleteCredential from "@calcom/features/credentials/handleDeleteCredential";
|
|
import type { TrpcSessionUser } from "@calcom/trpc/server/types";
|
|
|
|
import type { TDeleteCredentialInputSchema } from "./deleteCredential.schema";
|
|
|
|
type DeleteCredentialOptions = {
|
|
ctx: {
|
|
user: NonNullable<TrpcSessionUser>;
|
|
};
|
|
input: TDeleteCredentialInputSchema;
|
|
};
|
|
|
|
export const deleteCredentialHandler = async ({ ctx, input }: DeleteCredentialOptions) => {
|
|
const { user } = ctx;
|
|
const { id, teamId } = input;
|
|
|
|
await handleDeleteCredential({ userId: user.id, userMetadata: user.metadata, credentialId: id, teamId });
|
|
};
|