Rename deleteUser to removeUser since local state change in redux
parent
1529018d74
commit
ac38d4de79
|
@ -38,8 +38,8 @@ export const syncUser = (staleUser, syncedUser) => ({
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
export const deleteUser = user => ({
|
export const removeUser = user => ({
|
||||||
type: 'CHRONOGRAF_DELETE_USER',
|
type: 'CHRONOGRAF_REMOVE_USER',
|
||||||
payload: {
|
payload: {
|
||||||
user,
|
user,
|
||||||
},
|
},
|
||||||
|
@ -71,6 +71,6 @@ export const createUserAsync = (url, user) => async dispatch => {
|
||||||
dispatch(syncUser(user, data))
|
dispatch(syncUser(user, data))
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
dispatch(errorThrown(error))
|
dispatch(errorThrown(error))
|
||||||
dispatch(deleteUser(user))
|
dispatch(removeUser(user))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ const adminChronograf = (state = initialState, action) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'CHRONOGRAF_DELETE_USER': {
|
case 'CHRONOGRAF_REMOVE_USER': {
|
||||||
const {user} = action.payload
|
const {user} = action.payload
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
|
|
Loading…
Reference in New Issue