Skip to content

Commit 27a2abb

Browse files
committed
Update to use json-server api
1 parent 5972ea0 commit 27a2abb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/vuex/actions.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import request from 'axios'
22

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

55
export const getTopics = ({ commit, state }) => {
6-
return request.get('topics').then((response) => {
6+
return request.get('posts').then((response) => {
77
if (response.statusText === 'OK') {
8-
commit('TOPICS_LIST', response.data.data)
8+
commit('TOPICS_LIST', response.data)
99
}
1010
}).catch((error) => {
1111
console.log(error)

0 commit comments

Comments
 (0)