Added some changes to the propagate corporate changes

This commit is contained in:
Tiago Ribeiro
2024-05-21 11:21:14 +01:00
parent 5086c6fb09
commit 836b674076
2 changed files with 3 additions and 2 deletions

View File

@@ -90,7 +90,7 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
if (updatedUser.status || updatedUser.type === "corporate") {
// there's no await as this does not affect the user
propagateStatusChange(queryId, updatedUser.status);
propagateExpiryDateChanges(queryId, user.subscriptionExpirationDate || null, updatedUser.subscriptionExpirationDate || null);
propagateExpiryDateChanges(queryId, user.subscriptionExpirationDate, updatedUser.subscriptionExpirationDate || null);
}
res.status(200).json({ok: true});