2
0

🐛 (usage) Fix storage limit check

This commit is contained in:
Baptiste Arnaud
2022-09-21 08:00:25 +02:00
committed by Baptiste Arnaud
parent 1063429275
commit 1e26703ad4
6 changed files with 14 additions and 7 deletions

View File

@ -94,7 +94,7 @@ const checkStorageLimit = async (typebotId: string) => {
if (!totalStorageUsed) return false
const hasSentFirstEmail = workspace.storageLimitFirstEmailSentAt !== null
const hasSentSecondEmail = workspace.storageLimitSecondEmailSentAt !== null
const storageLimit = getStorageLimit(typebot.workspace)
const storageLimit = getStorageLimit(typebot.workspace) * 1024 * 1024 * 1024
if (
totalStorageUsed >= storageLimit * LIMIT_EMAIL_TRIGGER_PERCENT &&
!hasSentFirstEmail &&