import axios from 'axios';

export const FETCH_POSTS = 'fetch_posts';

const ROOT_URL = axios.get('http://reduxblog.herokuapp.com/api/');
const API_KEY = '?key=YOLO1984';

export function fetchPosts() {
  const request = axios.get(`${ROOT_URL}/posts${API_KEY}`);

  return {
    type: FETCH_POSTS,
    payload: request
  }
}

import axios from 'axios';

export const FETCH_POSTS = 'fetch_posts';

const ROOT_URL = 'http://reduxblog.herokuapp.com/api';
const API_KEY = '?key=YOLO1984';

export function fetchPosts() {
  const request = axios.get(`${ROOT_URL}/posts${API_KEY}`);

  return {
    type: FETCH_POSTS,
    payload: request
  }
}

Fix typo that was preventing the fetching of data
Fix typo that was preventing the fetching of data
