🚑 Disable usage check on viewer
This commit is contained in:
@@ -32,7 +32,7 @@ const handler = async (
|
|||||||
const typebotId = req.query.typebotId as string
|
const typebotId = req.query.typebotId as string
|
||||||
const blockId = req.query.blockId as string
|
const blockId = req.query.blockId as string
|
||||||
if (!filePath) return badRequest(res, 'Missing filePath or fileType')
|
if (!filePath) return badRequest(res, 'Missing filePath or fileType')
|
||||||
const hasReachedStorageLimit = await checkStorageLimit(typebotId)
|
// const hasReachedStorageLimit = await checkStorageLimit(typebotId)
|
||||||
const typebot = (await prisma.publicTypebot.findFirst({
|
const typebot = (await prisma.publicTypebot.findFirst({
|
||||||
where: { typebotId },
|
where: { typebotId },
|
||||||
})) as unknown as PublicTypebot
|
})) as unknown as PublicTypebot
|
||||||
@@ -53,7 +53,7 @@ const handler = async (
|
|||||||
|
|
||||||
return res.status(200).send({
|
return res.status(200).send({
|
||||||
presignedUrl,
|
presignedUrl,
|
||||||
hasReachedStorageLimit,
|
hasReachedStorageLimit: false,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return methodNotAllowed(res)
|
return methodNotAllowed(res)
|
||||||
|
|||||||
@@ -55,8 +55,8 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
const hasReachedLimit = await checkChatsUsage(result.typebot.workspace)
|
// const hasReachedLimit = await checkChatsUsage(result.typebot.workspace)
|
||||||
res.send({ result, hasReachedLimit })
|
res.send({ result, hasReachedLimit: false })
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
methodNotAllowed(res)
|
methodNotAllowed(res)
|
||||||
|
|||||||
Reference in New Issue
Block a user