Something went wrong on our end
-
Timothee P authoredTimothee P authored
misc-api.js 735 B
import axios from '@/axios-client.js';
import store from '../store';
const baseUrl = store.state.configuration.VUE_APP_DJANGO_API_BASE;
const miscAPI = {
async getIdgoCatalog() {
const response = await axios.get(
`${baseUrl}idgo-catalog/`
);
if (
response.status === 200 &&
response.data
) {
return response.data;
} else {
return null;
}
},
async getExternalGeojson(queryParams) {
const response = await axios.get(
`${baseUrl}external-geojson/${queryParams ? '?' + queryParams : ""}`
);
if (
response.status === 200 &&
response.data
) {
return response.data;
} else {
return null;
}
},
}
export default miscAPI;