diff -r 96f8a4a59bd9 -r d8588379529e client/src/sagas/index.js --- a/client/src/sagas/index.js Mon Jun 19 15:36:52 2017 +0200 +++ b/client/src/sagas/index.js Mon Jun 19 17:56:41 2017 +0200 @@ -137,6 +137,22 @@ } } +function* watchUpdateSettings() { + while (true) { + const { username, firstname, lastname } = yield take(types.USER_UPDATE_SETTINGS_ASYNC); + try { + yield client.put('/api/auth/user/', { + username, + first_name: firstname, + last_name: lastname + }); + yield put({ type: types.USER_UPDATE_SETTINGS, firstname, lastname }); + } catch (e) { + + } + } +} + // --- export default function* rootSaga() { @@ -149,5 +165,6 @@ watchLoginSubmit(), watchLoginRequest(), watchStoreToken(), + watchUpdateSettings(), ]) }