* Set the baseURL for ajax requests * Use async/await on AJAX calls * Add mix_public() cache generated asset cache busting * Move storage container into separate class * Fix some styling
17 lines
388 B
JavaScript
17 lines
388 B
JavaScript
/**
|
|
* Lookup an airport from the server
|
|
*
|
|
* @param {String} fromICAO
|
|
* @param {String} toICAO
|
|
*/
|
|
export default async (fromICAO, toICAO) => {
|
|
let params = {
|
|
method: 'GET',
|
|
url: '/api/airports/' + fromICAO + '/distance/' + toICAO,
|
|
};
|
|
|
|
const response = await axios(params);
|
|
console.log('distance raw response: ', response);
|
|
return response.data;
|
|
};
|