🚸 (dashboard) Add unpublish menu item in dashboard
Also remove the useless publishedTypebotId field in Typebot Closes #232
This commit is contained in:
@ -14,7 +14,7 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
|
||||
if (!workspaceId) return badRequest(res, 'workspaceId is required')
|
||||
const data = (
|
||||
typeof req.body === 'string' ? JSON.parse(req.body) : req.body
|
||||
) as PublicTypebot
|
||||
) as Omit<PublicTypebot, 'id'>
|
||||
const typebotContainsFileInput = data.groups
|
||||
.flatMap((g) => g.blocks)
|
||||
.some((b) => b.type === InputBlockType.FILE)
|
||||
|
@ -77,7 +77,7 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
|
||||
],
|
||||
},
|
||||
orderBy: { createdAt: 'desc' },
|
||||
select: { name: true, publishedTypebotId: true, id: true, icon: true },
|
||||
select: { name: true, id: true, icon: true },
|
||||
})
|
||||
return res.send({ typebots })
|
||||
}
|
||||
|
Reference in New Issue
Block a user