bbgo_origin/frontend/api/bbgo.js

19 lines
435 B
JavaScript
Raw Normal View History

2021-01-25 09:40:37 +00:00
import axios from "axios";
const baseURL = process.env.NODE_ENV === "development" ? "http://localhost:8080" : ""
2021-01-25 10:29:31 +00:00
export function querySessions(cb) {
axios.get(baseURL + '/api/sessions', {})
.then(response => {
cb(response.data.sessions)
});
}
2021-01-25 09:40:37 +00:00
export function queryAssets(cb) {
axios.get(baseURL + '/api/assets', {})
.then(response => {
cb(response.data.assets)
});
}