|
@@ -0,0 +1,15 @@
|
|
|
+import axios from 'axios';
|
|
|
+import { Configuration } from './configuration';
|
|
|
+import { AirportOverview } from '../types';
|
|
|
+
|
|
|
+export class Airport {
|
|
|
+ static async all(): Promise<AirportOverview[]> {
|
|
|
+ return axios
|
|
|
+ .get<AirportOverview[]>(`${Configuration.resourceServer}/airport/all`, {
|
|
|
+ headers: {
|
|
|
+ Authorization: `Bearer ${sessionStorage.getItem('token')}`,
|
|
|
+ },
|
|
|
+ })
|
|
|
+ .then((response) => response.data);
|
|
|
+ }
|
|
|
+}
|