import axios from 'axios'; import { Configuration } from './configuration'; import { AirportOverview } from '../types'; export class Airport { static async all(): Promise { const token = sessionStorage.getItem('token'); if (!token) return []; return axios .get(`${Configuration.resourceServer}/airport/all`, { headers: { Authorization: `Bearer ${token}`, }, }) .then((response) => response.data) .catch(() => []); } }