Solved an issue where the company name of country managers wasn't able to be updated

This commit is contained in:
Tiago Ribeiro
2024-04-02 10:53:34 +01:00
parent 62ecc4e395
commit f374d91ef8
4 changed files with 27 additions and 29 deletions

View File

@@ -85,7 +85,7 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
const user = await setDoc(userRef, updatedUser, {merge: true});
await managePaymentRecords(updatedUser, updatedUser.id);
if (updatedUser.status) {
if (updatedUser.status || updatedUser.type === "corporate") {
// there's no await as this does not affect the user
propagateStatusChange(queryId, updatedUser.status);
}