update register call
This commit is contained in:
@@ -148,7 +148,10 @@ export const AuthProvider = ({ children }) => {
|
|||||||
dispatch({ type: actionTypes.SET_LOADING, payload: true });
|
dispatch({ type: actionTypes.SET_LOADING, payload: true });
|
||||||
dispatch({ type: actionTypes.CLEAR_ERROR });
|
dispatch({ type: actionTypes.CLEAR_ERROR });
|
||||||
|
|
||||||
const response = await authAPI.register(userData);
|
// Filter out frontend-only fields before sending to backend
|
||||||
|
const { confirmPassword, agreeTerms, ...backendData } = userData;
|
||||||
|
|
||||||
|
const response = await authAPI.register(backendData);
|
||||||
|
|
||||||
dispatch({
|
dispatch({
|
||||||
type: actionTypes.LOGIN_SUCCESS,
|
type: actionTypes.LOGIN_SUCCESS,
|
||||||
|
|||||||
Reference in New Issue
Block a user