Made the corporate name being the creator's one

This commit is contained in:
Tiago Ribeiro
2024-09-04 17:40:26 +01:00
parent 7bcd0f863f
commit cb2c1641f5

View File

@@ -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,
},
},