2018-02-04 11:56:32 +00:00
|
|
|
import * as types from './actionTypes'
|
|
|
|
|
|
|
|
export const startFetchingCharacters = () => ({
|
|
|
|
type: types.START_FETCHING_CHARACTERS
|
|
|
|
})
|
|
|
|
export const stopFetchingCharacters = () => ({
|
|
|
|
type: types.STOP_FETCHING_CHARACTERS
|
|
|
|
})
|
2018-08-05 17:56:04 +00:00
|
|
|
export const fetchCharacter = (isServer = false) => ({
|
2018-02-04 11:56:32 +00:00
|
|
|
type: types.FETCH_CHARACTER,
|
|
|
|
payload: { isServer }
|
|
|
|
})
|
|
|
|
export const fetchCharacterSuccess = (response, isServer) => ({
|
|
|
|
type: types.FETCH_CHARACTER_SUCCESS,
|
|
|
|
payload: { response, isServer }
|
|
|
|
})
|
|
|
|
|
|
|
|
export const fetchCharacterFailure = (error, isServer) => ({
|
|
|
|
type: types.FETCH_CHARACTER_FAILURE,
|
|
|
|
payload: { error, isServer }
|
|
|
|
})
|