build(lib): 🔖 Update lib to 2.1.3
This commit is contained in:
@ -139,4 +139,4 @@ export const parseInitBubbleCode = ({
|
||||
)
|
||||
}
|
||||
|
||||
export const typebotJsHtml = `<script src="https://unpkg.com/typebot-js@2.1.0"></script>`
|
||||
export const typebotJsHtml = `<script src="https://unpkg.com/typebot-js@2.1.3"></script>`
|
||||
|
@ -24,7 +24,7 @@ module.exports = withBundleAnalyzer({
|
||||
},
|
||||
{
|
||||
source: '/typebot-lib/v2',
|
||||
destination: 'https://unpkg.com/typebot-js@2.1.1/dist/index.umd.min.js',
|
||||
destination: 'https://unpkg.com/typebot-js@2.1.3/dist/index.umd.min.js',
|
||||
permanent: true,
|
||||
},
|
||||
]
|
||||
|
@ -14,14 +14,12 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
|
||||
})
|
||||
if (!typebot) return res.status(400).send({ message: 'Typebot not found' })
|
||||
const limit = Number(req.query.limit)
|
||||
console.log(limit, typebot.id)
|
||||
const results = (await prisma.result.findMany({
|
||||
where: { typebotId: typebot.id },
|
||||
orderBy: { createdAt: 'desc' },
|
||||
take: limit,
|
||||
include: { answers: true },
|
||||
})) as unknown as ResultWithAnswers[]
|
||||
console.log(results)
|
||||
return res.send({
|
||||
results: results.map(parseAnswers(typebot as unknown as Typebot)),
|
||||
})
|
||||
|
Reference in New Issue
Block a user