This commit is contained in:
smanylov
2026-02-05 11:55:02 +07:00
parent a84cd39737
commit 1037347e06
3 changed files with 10 additions and 9 deletions
+3
View File
@@ -170,6 +170,8 @@ export async function registration(
const validatedFields = SignupFormSchema.safeParse(dataToValidate);
console.log(`try to register ${accountType}`);
if (!validatedFields.success) {
const errors: Record<string, string> = {}
JSON.parse(validatedFields.error.message).forEach((obj: {
@@ -227,6 +229,7 @@ export async function registration(
};
if (parsed.message_desc === 'Operation successful') {
console.log(`registration - ${accountType}`);
await createSession(parsed.message_body.token, email as string);
} else {
throw parsed;