12 lines
291 B
TypeScript
12 lines
291 B
TypeScript
import prisma from "@calcom/prisma";
|
|
import type { User } from "@calcom/prisma/client";
|
|
|
|
export async function deleteUser(user: Pick<User, "id" | "email" | "metadata">) {
|
|
// TODO: Move this to Repository pattern.
|
|
await prisma.user.delete({
|
|
where: {
|
|
id: user.id,
|
|
},
|
|
});
|
|
}
|