Skip to content

Commit f61b400

Browse files
committed
Use api url instead define for each action
1 parent cd11b84 commit f61b400

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/client/actions/computers.es

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export function getAllComputers(mark = '') {
2525
}}`;
2626

2727
return dispatch => {
28-
request.get('/api/v1', {query}).then(({data}) => {
28+
request.get('/', {query}).then(({data}) => {
2929
dispatch({ type: types.GET_ALL_COMPUTERS, computers: data.computers });
3030
});
3131
};

src/client/actions/phones.es

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export function getAllPhones(mark = '') {
2121
}}`;
2222

2323
return dispatch => {
24-
request.get('/api/v1', {query}).then(({data}) => {
24+
request.get('/', {query}).then(({data}) => {
2525
dispatch({ type: types.GET_ALL_PHONES, phones: data.phones });
2626
});
2727
};

src/client/utils/request.es

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import request from 'superagent';
44

5-
const API_URL = '';
5+
const API_URL = '/api/v1';
66
const HEADERS = { Accept: 'application/json' };
77
const setPrefix = (prefix) => {
88
return (req) => {

0 commit comments

Comments
 (0)