update register call

This commit is contained in:
Jake Kasper
2025-08-21 10:28:25 -05:00
parent 37322d0e45
commit e333a2e32d

View File

@@ -148,7 +148,10 @@ export const AuthProvider = ({ children }) => {
dispatch({ type: actionTypes.SET_LOADING, payload: true });
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({
type: actionTypes.LOGIN_SUCCESS,