* watchlist schema update * changes addressed * no backfill audit * fix type * fix flow of migration * fix err * type err fix * add if exists check in migration
18 lines
368 B
TypeScript
18 lines
368 B
TypeScript
import prismock from "../../../../tests/libs/__mocks__/prisma";
|
|
|
|
import type { WatchlistType } from "@calcom/prisma/enums";
|
|
|
|
interface WatchlistInput {
|
|
type: WatchlistType;
|
|
value: string;
|
|
}
|
|
|
|
export const createWatchlistEntry = async (input: WatchlistInput) => {
|
|
await prismock.watchlist.create({
|
|
data: {
|
|
...input,
|
|
createdById: 0,
|
|
},
|
|
});
|
|
};
|