Add state api
parent
aec0b77d29
commit
731404aea0
@ -1,7 +1,11 @@
|
|||||||
import Axios from 'axios'
|
import Axios from 'axios'
|
||||||
|
|
||||||
|
const BACKEND_HOST = 'http://169.254.61.222:5000'
|
||||||
|
|
||||||
export function getMap(x, y) {
|
export function getMap(x, y) {
|
||||||
return Axios.get(`http://169.254.61.222:5000/generate/${x}/${y}`).then(
|
return Axios.get(`${BACKEND_HOST}/generate/${x}/${y}`).then(data => data.data)
|
||||||
data => data.data
|
}
|
||||||
)
|
|
||||||
|
export function getState() {
|
||||||
|
return Axios.get(`${BACKEND_HOST}/state`).then(data => data.data)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue