Fix registration form workflow

merge-requests/451/head
Alex Gleason 2021-03-26 15:45:46 -05:00
rodzic eae309e150
commit f24422d520
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -106,7 +106,7 @@ export function createAccount(params) {
return (dispatch, getState) => {
dispatch({ type: ACCOUNT_CREATE_REQUEST, params });
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 => {
dispatch({ type: ACCOUNT_CREATE_FAIL, error, params });
throw error;

Wyświetl plik

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