phpvms/resources/js/admin/airport_lookup.js
Nabeel S bbec276da8
#355 Calculate distance button (#366)
* #355 Calculate distance button in add/edit Flight page

* Styling

* Move add/edit flight logic out of controller and into service layer

* Styling

* Formatting

* Run styleci against modules dir

* Styleci config

* Style fixes in /modules
2019-08-26 12:32:46 -04:00

19 lines
388 B
JavaScript

/**
* Lookup an airport from the server
* @param icao
* @param callback
*/
export default (icao, callback) => {
let params = {
method: 'GET',
url: '/api/airports/' + icao + '/lookup',
};
console.log('Looking airport up');
axios(params)
.then(response => {
console.log(response);
callback(response.data);
});
};