Properly setting session when logging in or out

This commit is contained in:
Collin Duncan 2023-04-17 12:23:58 +02:00
parent fa99ad7941
commit eb9991895a
No known key found for this signature in database

View file

@ -137,6 +137,11 @@ export class Runner {
.catch((e: Error) => {
throw new RunnerLoginSubmitError(e)
})
this.session = {
loggedInAt: dayjs(),
username,
}
}
private async logout() {
@ -146,6 +151,7 @@ export class Runner {
.catch((e: Error) => {
throw new RunnerLogoutError(e)
})
this.session = undefined
}
private async makeReservation(reservation: Reservation) {