diff --git a/src/app/actions/auth.ts b/src/app/actions/auth.ts index 5fae757..f1deae4 100644 --- a/src/app/actions/auth.ts +++ b/src/app/actions/auth.ts @@ -155,7 +155,7 @@ export async function registration( const accountType = formData.get('accountType') as 'b2b' | 'b2c'; /* вернуть в true когда проект выйдет из дева */ - const mail_verified = true; + const mail_verified = false; const fullName = formData.get('fullName') as string || ''; const email = formData.get('email') as string || ''; const password = formData.get('password') as string || ''; @@ -246,6 +246,8 @@ export async function registration( password, accountType, mail_verified: mail_verified, + ip: ip, + user_agent: userAgent, ...(accountType === 'b2b' && { companyName: companyName, inn: inn }), ...(referralCode !== '' && { referralLink: referralCode }) } @@ -262,6 +264,8 @@ export async function registration( phone: phone, password, accountType, + ip: ip, + user_agent: userAgent, ...(accountType === 'b2b' && { companyName: companyName, inn: inn }), ...(referralCode !== '' && { referralLink: referralCode }) }) @@ -269,7 +273,7 @@ export async function registration( if (response.ok) { let parsed = await response.json() as { message_desc: string, - message_body: { token: string, userId: number }, + message_body: { token: string, userId: number, fieldErrors: string }, message_code: number };