✨ (billing) Implement custom plan
This commit is contained in:
committed by
Baptiste Arnaud
parent
3f7dc79918
commit
385853ca3c
@ -1,4 +1,4 @@
|
||||
import { Plan, PrismaClient, User, Workspace, WorkspaceRole } from 'db'
|
||||
import { Plan, Prisma, PrismaClient, User, Workspace, WorkspaceRole } from 'db'
|
||||
import cuid from 'cuid'
|
||||
import { Typebot, Webhook } from 'models'
|
||||
import { readFileSync } from 'fs'
|
||||
@ -166,3 +166,13 @@ export const updateTypebot = async (
|
||||
data: partialTypebot,
|
||||
})
|
||||
}
|
||||
|
||||
export const updateWorkspace = async (
|
||||
id: string,
|
||||
data: Prisma.WorkspaceUncheckedUpdateManyInput
|
||||
) => {
|
||||
await prisma.workspace.updateMany({
|
||||
where: { id: proWorkspaceId },
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user