revert changes

This commit is contained in:
smanylov
2026-02-03 17:36:09 +07:00
parent 61e3d08136
commit e8c57729be
10 changed files with 145 additions and 181 deletions
-16
View File
@@ -170,8 +170,6 @@ export async function registration(
const validatedFields = SignupFormSchema.safeParse(dataToValidate);
console.log(`account-type ${accountType}`)
if (!validatedFields.success) {
const errors: Record<string, string> = {}
JSON.parse(validatedFields.error.message).forEach((obj: {
@@ -199,19 +197,6 @@ export async function registration(
};
}
/*
return {
previousState: {
fullName,
email,
password,
confirm_password,
phone,
agree,
...(accountType === 'b2b' && { companyName })
}
}; */
try {
const { fullName, email, password, phone } = validatedFields.data;
const response = await fetch(`${API_BASE_URL}/api/v1/data`, {
@@ -243,7 +228,6 @@ export async function registration(
if (parsed.message_desc === 'Operation successful') {
await createSession(parsed.message_body.token, email as string);
console.log('succes registration');
} else {
throw parsed;
}