2
0

🛂 Reset isQuarantined when upgrading workspace

This commit is contained in:
Baptiste Arnaud
2023-04-23 21:03:14 +02:00
parent 69e1c4f20d
commit c6983c952c
5 changed files with 9 additions and 278 deletions

View File

@@ -148,10 +148,7 @@ export const updateSubscription = authenticatedProcedure
plan,
additionalChatsIndex: additionalChats,
additionalStorageIndex: additionalStorage,
chatsLimitFirstEmailSentAt: null,
chatsLimitSecondEmailSentAt: null,
storageLimitFirstEmailSentAt: null,
storageLimitSecondEmailSentAt: null,
isQuarantined: false,
},
})

View File

@@ -69,10 +69,7 @@ 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,
isQuarantined: false,
},
})
@@ -137,10 +134,6 @@ const webhookHandler = async (req: NextApiRequest, res: NextApiResponse) => {
plan: Plan.FREE,
additionalChatsIndex: 0,
additionalStorageIndex: 0,
chatsLimitFirstEmailSentAt: null,
chatsLimitSecondEmailSentAt: null,
storageLimitFirstEmailSentAt: null,
storageLimitSecondEmailSentAt: null,
customChatsLimit: null,
customStorageLimit: null,
customSeatsLimit: null,