Add state api

This commit is contained in:
Alfred Melch 2020-01-03 15:04:25 +01:00
parent aec0b77d29
commit 731404aea0

View File

@ -1,7 +1,11 @@
import Axios from 'axios'
const BACKEND_HOST = 'http://169.254.61.222:5000'
export function getMap(x, y) {
return Axios.get(`http://169.254.61.222:5000/generate/${x}/${y}`).then(
data => data.data
)
return Axios.get(`${BACKEND_HOST}/generate/${x}/${y}`).then(data => data.data)
}
export function getState() {
return Axios.get(`${BACKEND_HOST}/state`).then(data => data.data)
}