diff --git a/src/pages/api/make_user.ts b/src/pages/api/make_user.ts index 271eea8a..48baec94 100644 --- a/src/pages/api/make_user.ts +++ b/src/pages/api/make_user.ts @@ -79,11 +79,11 @@ async function post(req: NextApiRequest, res: NextApiResponse) { isVerified: true, registrationDate: new Date(), subscriptionExpirationDate: expiryDate || null, - ...(!!corporateCorporate && type === "corporate" + ...((maker.type === "corporate" || maker.type === "mastercorporate") && type === "corporate" ? { corporateInformation: { companyInformation: { - name: corporateCorporate.corporateInformation?.companyInformation?.name || "N/A", + name: maker.corporateInformation?.companyInformation?.name || "N/A", userAmount: 0, }, },