Skip to content

Commit

Permalink
Update to use json-server api
Browse files Browse the repository at this point in the history
  • Loading branch information
doabit committed Aug 7, 2016
1 parent 5972ea0 commit 27a2abb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/vuex/actions.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import request from 'axios'

request.defaults.baseURL = 'https://cnodejs.org/api/v1/'
request.defaults.baseURL = 'http://jsonplaceholder.typicode.com/'

export const getTopics = ({ commit, state }) => {
return request.get('topics').then((response) => {
return request.get('posts').then((response) => {
if (response.statusText === 'OK') {
commit('TOPICS_LIST', response.data.data)
commit('TOPICS_LIST', response.data)
}
}).catch((error) => {
console.log(error)
Expand Down

0 comments on commit 27a2abb

Please sign in to comment.