mirror of
https://github.com/hanzoai/calendar.git
synced 2026-09-24 22:42:24 +00:00
* perf: Slim down loggedInViewer some more * Move locationOptions to apps router * Moved calVideo related handlers to separate router * Moved calendar related handlers to separate router * Rename * Moved deleteCredential to new router * Moved updateProfile to me router * fix unit test * fix e2e test * tweak * missing --------- Co-authored-by: Anik Dhabal Babu <[email protected]> Co-authored-by: unknown <[email protected]>
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 });
|
|
};
|