2
0

chore: 🔥 Remove ownerIds

This commit is contained in:
Baptiste Arnaud
2022-05-14 16:52:05 -07:00
parent 210bad32f9
commit bda4116fbc
47 changed files with 81 additions and 81 deletions

View File

@ -34,7 +34,6 @@ export function CustomAdapter(p: PrismaClient): Adapter {
...data,
id: user.id,
apiToken: randomUUID(),
plan: process.env.ADMIN_EMAIL === data.email ? Plan.PRO : Plan.FREE,
workspaces:
workspaceInvitations.length > 0
? undefined

View File

@ -81,7 +81,6 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
'blocks' in data
? data
: (parseNewTypebot({
ownerId: user.id,
ownerAvatarUrl: user.image,
...data,
}) as Prisma.TypebotUncheckedCreateInput),

View File

@ -24,7 +24,7 @@ const DashboardPage = () => {
useEffect(() => {
const subscribePlan = query.subscribePlan as 'pro' | 'team' | undefined
if (workspace && subscribePlan && user && user.plan === 'FREE') {
if (workspace && subscribePlan && user && workspace.plan === 'FREE') {
setIsLoading(true)
pay({
user,