phpvms/resources/js/admin/calculate_distance.js

25 lines
584 B
JavaScript
Raw Normal View History

/**
* Before you edit these, read the documentation on how these files are compiled:
2020-09-05 01:32:39 +08:00
* https://docs.phpvms.net/developers/building-assets
*
* Edits here don't take place until you compile these assets and then upload them.
*/
import request from '../request';
/**
* Lookup an airport from the server
*
* @param {String} fromICAO
* @param {String} toICAO
*/
export default async (fromICAO, toICAO) => {
const params = {
method: 'GET',
url: `/api/airports/${fromICAO}/distance/${toICAO}`,
};
const response = await request(params);
return response.data;
};