From d74d2e9e87b64f5051b129e2153fb3dff15f7e5d Mon Sep 17 00:00:00 2001 From: gaba Date: Thu, 2 Feb 2017 15:25:45 -0800 Subject: [PATCH] Dispatchs the user. --- client/coral-framework/actions/auth.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/coral-framework/actions/auth.js b/client/coral-framework/actions/auth.js index 914b88095..d21870ac5 100644 --- a/client/coral-framework/actions/auth.js +++ b/client/coral-framework/actions/auth.js @@ -20,10 +20,10 @@ export const updateDisplayName = displayName => ({type: actions.UPDATE_DISPLAYNA export const createDisplayName = (userId, formData) => dispatch => { dispatch(createDisplayNameRequest()); coralApi(`/users/${userId}/displayname`, {method: 'POST', body: formData}) - .then(() => { + .then((user) => { dispatch(createDisplayNameSuccess()); dispatch(hideCreateDisplayNameDialog()); - dispatch(updateDisplayName(formData.displayName)); + dispatch(updateDisplayName(user)); }) .catch(error => { dispatch(createDisplayNameFailure(lang.t(`error.${error.message}`)));