external.js 574 Bytes
Newer Older
abergavenny's avatar
abergavenny committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import axios from 'axios'

import appConfig from '../config/appConfig.js'

const URI = appConfig.simulationEndpoint

export const executeSimulation = async (data) => {
  return axios.post(`${URI}/executeSimulation`, { ...data })
    .then(response => response.data)
    .catch(e => {
      console.log('ERROR:', e.name)
      return null
    })
}

export const getInformation = async (gmlId) => {
  return axios.get(`${URI}/getInformation?gmlId=${gmlId}`)
    .then(response => response.data)
    .catch(e => {
      console.log('ERROR:', e.name)
      return null
    })
}