From f24422d5206de82f34ad3e720d05edd44868e0e4 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 26 Mar 2021 15:45:46 -0500 Subject: [PATCH] Fix registration form workflow --- app/soapbox/actions/accounts.js | 2 +- app/soapbox/actions/auth.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/soapbox/actions/accounts.js b/app/soapbox/actions/accounts.js index 52a06afdc..c1e2341fd 100644 --- a/app/soapbox/actions/accounts.js +++ b/app/soapbox/actions/accounts.js @@ -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; diff --git a/app/soapbox/actions/auth.js b/app/soapbox/actions/auth.js index 5e1672a6d..98deb2e1d 100644 --- a/app/soapbox/actions/auth.js +++ b/app/soapbox/actions/auth.js @@ -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)); }); }; }