From 855a2856c81614966c8227f52d95475cc5f334b0 Mon Sep 17 00:00:00 2001 From: Baptiste Arnaud Date: Tue, 6 Dec 2022 17:40:09 +0100 Subject: [PATCH] :ambulance: Disable usage check on viewer --- .../[typebotId]/blocks/[blockId]/storage/upload-url.ts | 4 ++-- apps/viewer/src/pages/api/typebots/[typebotId]/results.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/viewer/src/pages/api/typebots/[typebotId]/blocks/[blockId]/storage/upload-url.ts b/apps/viewer/src/pages/api/typebots/[typebotId]/blocks/[blockId]/storage/upload-url.ts index 17731339f9..8a65853c93 100644 --- a/apps/viewer/src/pages/api/typebots/[typebotId]/blocks/[blockId]/storage/upload-url.ts +++ b/apps/viewer/src/pages/api/typebots/[typebotId]/blocks/[blockId]/storage/upload-url.ts @@ -32,7 +32,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 @@ -53,7 +53,7 @@ const handler = async ( return res.status(200).send({ presignedUrl, - hasReachedStorageLimit, + hasReachedStorageLimit: false, }) } return methodNotAllowed(res) diff --git a/apps/viewer/src/pages/api/typebots/[typebotId]/results.ts b/apps/viewer/src/pages/api/typebots/[typebotId]/results.ts index 4ccc98c4b7..d037dd1c5a 100644 --- a/apps/viewer/src/pages/api/typebots/[typebotId]/results.ts +++ b/apps/viewer/src/pages/api/typebots/[typebotId]/results.ts @@ -55,8 +55,8 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => { }, }, }) - const hasReachedLimit = await checkChatsUsage(result.typebot.workspace) - res.send({ result, hasReachedLimit }) + // const hasReachedLimit = await checkChatsUsage(result.typebot.workspace) + res.send({ result, hasReachedLimit: false }) return } methodNotAllowed(res)