cleanup
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-07-16 12:17:32 +02:00
parent 4190a23dec
commit 74734113b0
2 changed files with 17 additions and 10 deletions

View File

@ -9,19 +9,12 @@ const gen_id = (length)=>{
}
const query_nominatim = (q,f)=>{
const ENDPOINT = 'https://nominatim.openstreetmap.org/';
const FORMAT = 'jsonv2';
return axios.get(ENDPOINT, {
params: {
format: FORMAT,
q:q,
},
}).then(res=>res.data).then(res=>res.filter(f));
const ENDPOINT = '/api/place/'+q;
return axios.get(ENDPOINT).then(res=>res.data).then(res=>res.filter(f));
}
const query_flight = (q)=>{
const ENDPOINT = '/api/flight/'+q;
const FORMAT = '-';
return axios.get(ENDPOINT).then(res=>res.data);
}