feat: restrict reauth to EE

This commit is contained in:
David Nguyen
2024-03-26 16:46:47 +08:00
parent 94da57704d
commit b6c4cc9dc8
14 changed files with 401 additions and 62 deletions

View File

@ -0,0 +1,19 @@
import { prisma } from '..';
export const seedTestEmail = () => `user-${Date.now()}@test.documenso.com`;
type SeedSubscriptionOptions = {
userId: number;
priceId: string;
};
export const seedUserSubscription = async ({ userId, priceId }: SeedSubscriptionOptions) => {
return await prisma.subscription.create({
data: {
userId,
planId: Date.now().toString(),
priceId,
status: 'ACTIVE',
},
});
};