🐛 (usage) Fix storage limit check
This commit is contained in:
committed by
Baptiste Arnaud
parent
1063429275
commit
1e26703ad4
@ -174,6 +174,10 @@ const updateSubscription = async (req: NextApiRequest) => {
|
||||
plan,
|
||||
additionalChatsIndex: additionalChats,
|
||||
additionalStorageIndex: additionalStorage,
|
||||
chatsLimitFirstEmailSentAt: null,
|
||||
chatsLimitSecondEmailSentAt: null,
|
||||
storageLimitFirstEmailSentAt: null,
|
||||
storageLimitSecondEmailSentAt: null,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
@ -58,6 +58,10 @@ const webhookHandler = async (req: NextApiRequest, res: NextApiResponse) => {
|
||||
stripeId: session.customer as string,
|
||||
additionalChatsIndex: parseInt(additionalChats),
|
||||
additionalStorageIndex: parseInt(additionalStorage),
|
||||
chatsLimitFirstEmailSentAt: null,
|
||||
chatsLimitSecondEmailSentAt: null,
|
||||
storageLimitFirstEmailSentAt: null,
|
||||
storageLimitSecondEmailSentAt: null,
|
||||
},
|
||||
})
|
||||
return res.status(200).send({ message: 'workspace upgraded in DB' })
|
||||
|
Reference in New Issue
Block a user