2
0

♻️ (usage) Remove limit until temporarily

This commit is contained in:
Baptiste Arnaud
2022-09-26 08:07:49 +02:00
committed by Baptiste Arnaud
parent 3c803b1345
commit 3bec24a8cc
6 changed files with 94 additions and 67 deletions

View File

@ -35,7 +35,7 @@ const handler = async (
const typebotId = req.query.typebotId as string
const blockId = req.query.blockId as string
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({
where: { typebotId },
})) as unknown as PublicTypebot
@ -54,7 +54,8 @@ const handler = async (
sizeLimit: sizeLimit * 1024 * 1024,
})
return res.status(200).send({ presignedUrl, hasReachedStorageLimit })
// TODO: enable storage limit on 1st of November 2022
return res.status(200).send({ presignedUrl, hasReachedStorageLimit: false })
}
return methodNotAllowed(res)
}

View File

@ -52,8 +52,9 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
},
},
})
const hasReachedLimit = await checkChatsUsage(result.typebot.workspace)
res.send({ result, hasReachedLimit })
// TODO: enable storage limit on 1st of November 2022
// const hasReachedLimit = await checkChatsUsage(result.typebot.workspace)
res.send({ result, hasReachedLimit: false })
return
}
methodNotAllowed(res)