import {
  FETCH_ADS_REQUEST,
  FETCH_ADS_SUCCESS,
  FETCH_ADS_FAILURE,
  FETCH_AD_REQUEST,
  FETCH_AD_SUCCESS,
  FETCH_AD_FAILURE,
} from '../types'


//Ads list

export const fetchAdsRequest = (payload) => ({
    type: FETCH_ADS_REQUEST,
    payload
  });
  
  export const fetchAdsSuccess = res => ({
    type: FETCH_ADS_SUCCESS,
    res
  });
  
  export const fetchAdsFailure = res => ({
    type: FETCH_ADS_FAILURE,
    res
  });

  //Single ad

  export const fetchAdRequest = payload => ({
    type: FETCH_AD_REQUEST,
    payload
  });
  
  export const fetchAdSuccess = res => ({
    type: FETCH_AD_SUCCESS,
    res
  });
  
  export const fetchAdFailure = res => ({
    type: FETCH_AD_FAILURE,
    res
  });