use constant for the route

This commit is contained in:
Iuri Matias 2018-08-06 11:40:32 -04:00 committed by Pascal Precht
parent f57d4b0a66
commit 92c952c7d1
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D

View File

@ -66,13 +66,13 @@ export function webSocketBlockHeader() {
} }
export function fetchContract(contractName) { export function fetchContract(contractName) {
return axios.get('http://localhost:8000/embark-api/contract/' + contractName); return axios.get(`${constants.httpEndpoint}/contract/${contractName}`);
} }
export function fetchContracts() { export function fetchContracts() {
return axios.get('http://localhost:8000/embark-api/contracts'); return axios.get(`${constants.httpEndpoint}/contracts`);
} }
export function fetchContractProfile(contractName) { export function fetchContractProfile(contractName) {
return axios.get('http://localhost:8000/embark-api/profiler/' + contractName); return axios.get(`${constants.httpEndpoint}/profiler/${contractName}`);
} }