use the new session management

This commit is contained in:
Sven Czarnian
2022-11-04 21:04:45 +01:00
parent acea193aa0
commit fc05ae4546
8 changed files with 44 additions and 60 deletions

View File

@@ -1,10 +1,11 @@
import axios from 'axios';
import { Configuration } from './configuration';
import { Session } from './session';
import { AirportOverview } from '../types';
export class Airport {
static async all(): Promise<AirportOverview[]> {
const token = sessionStorage.getItem('token');
const token = Session.bearerToken();
if (!token) return [];
return axios