revert changes
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user