import { apiRequest } from '../../common/helpers/api';

export const BETA_REGISTERING = 'BETA_REGISTERING';
export const BETA_REGISTER_SUCCESS = 'BETA_REGISTER_SUCCESS';
export const BETA_REGISTER_FAILURE = 'BETA_REGISTER_FAILURE';

export function registerBeta() {
  return dispatch => {
    dispatch({ type: BETA_REGISTERING });

    const settings = {
      method: 'POST',
    };

    apiRequest('/health_beta_registrations',
      settings,
      response => dispatch({
        type: BETA_REGISTER_SUCCESS,
        username: response.user,
        stats: 'succeeded',
      }),
      () => dispatch({
        type: BETA_REGISTER_FAILURE,
        stats: 'failed'
      })
    );
  };
}


@@ -399,15 +399,8 @@
 t('/
-health_
 beta
@@ -412,17 +412,31 @@
 stration
-s
+/health_account
 ',%0A     

Update health beta registration API request path