Commiting
This commit is contained in:
@@ -5,18 +5,19 @@ export const PROMOTIONS_FETCH_REQUEST = 'PROMOTIONS_FETCH_REQUEST'
|
||||
export const PROMOTIONS_FETCH_SUCCESS = 'PROMOTIONS_FETCH_SUCCESS'
|
||||
export const PROMOTIONS_FETCH_FAIL = 'PROMOTIONS_FETCH_FAIL'
|
||||
|
||||
export const fetchPromotions = () => {
|
||||
return (dispatch, getState) => {
|
||||
if (!me) return
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const fetchPromotions = () => (dispatch, getState) => {
|
||||
if (!me) return
|
||||
|
||||
dispatch(fetchPromotionsRequest())
|
||||
dispatch(fetchPromotionsRequest())
|
||||
|
||||
api(getState).get('/api/v1/promotions').then((response) => {
|
||||
dispatch(fetchPromotionsSuccess(response.data))
|
||||
}).catch((error) => {
|
||||
dispatch(fetchPromotionsFail(error))
|
||||
})
|
||||
}
|
||||
api(getState).get('/api/v1/promotions').then((response) => {
|
||||
dispatch(fetchPromotionsSuccess(response.data))
|
||||
}).catch((error) => {
|
||||
dispatch(fetchPromotionsFail(error))
|
||||
})
|
||||
}
|
||||
|
||||
const fetchPromotionsRequest = () => ({
|
||||
|
||||
Reference in New Issue
Block a user