0d1f38cf85
* Refactor all JS API calls #360 * Remove unused imports * Lint JS * Fix doubled api key * Formatting * Added extra logging to distance lookup * Remove the .editorconfig file in distrib * shell check fixes * Remove the .editorconfig file in distrib
19 lines
345 B
JavaScript
19 lines
345 B
JavaScript
|
|
import request from '../request';
|
|
|
|
/**
|
|
* Lookup an airport from the server
|
|
*
|
|
* @param {String} icao
|
|
*/
|
|
export default async (icao) => {
|
|
const params = {
|
|
method: 'GET',
|
|
url: `/api/airports/${icao}/lookup`,
|
|
};
|
|
|
|
const response = await request(params);
|
|
console.log('lookup raw response: ', response);
|
|
return response.data;
|
|
};
|