Fix registration form workflow

This commit is contained in:
Alex Gleason 2021-03-26 15:45:46 -05:00
parent eae309e150
commit f24422d520
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
2 changed files with 2 additions and 2 deletions

View file

@ -106,7 +106,7 @@ export function createAccount(params) {
return (dispatch, getState) => { return (dispatch, getState) => {
dispatch({ type: ACCOUNT_CREATE_REQUEST, params }); dispatch({ type: ACCOUNT_CREATE_REQUEST, params });
return api(getState, 'app').post('/api/v1/accounts', params).then(({ data: token }) => { return api(getState, 'app').post('/api/v1/accounts', params).then(({ data: token }) => {
dispatch({ type: ACCOUNT_CREATE_SUCCESS, params, token }); return dispatch({ type: ACCOUNT_CREATE_SUCCESS, params, token });
}).catch(error => { }).catch(error => {
dispatch({ type: ACCOUNT_CREATE_FAIL, error, params }); dispatch({ type: ACCOUNT_CREATE_FAIL, error, params });
throw error; throw error;

View file

@ -212,7 +212,7 @@ export function register(params) {
return dispatch(createAppAndToken()).then(() => { return dispatch(createAppAndToken()).then(() => {
return dispatch(createAccount(params)); return dispatch(createAccount(params));
}).then(token => { }).then(token => {
dispatch(authLoggedIn(token)); return dispatch(authLoggedIn(token));
}); });
}; };
} }