Improve web api protect (#6343)

This commit is contained in:
abcang
2018-04-17 22:23:46 +09:00
committed by Eugen Rochko
parent 204d72fbe4
commit 897199910f
6 changed files with 18 additions and 10 deletions

View File

@ -24,7 +24,7 @@ const debouncedSave = debounce((dispatch, getState) => {
const data = getState().get('settings').filter((_, path) => path !== 'saved').toJS();
api(getState).put('/api/web/settings', { data })
api().put('/api/web/settings', { data })
.then(() => dispatch({ type: SETTING_SAVE }))
.catch(error => dispatch(showAlertForError(error)));
}, 5000, { trailing: true });