Properly setting session when logging in or out
This commit is contained in:
parent
fa99ad7941
commit
eb9991895a
1 changed files with 6 additions and 0 deletions
|
|
@ -137,6 +137,11 @@ export class Runner {
|
||||||
.catch((e: Error) => {
|
.catch((e: Error) => {
|
||||||
throw new RunnerLoginSubmitError(e)
|
throw new RunnerLoginSubmitError(e)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
this.session = {
|
||||||
|
loggedInAt: dayjs(),
|
||||||
|
username,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async logout() {
|
private async logout() {
|
||||||
|
|
@ -146,6 +151,7 @@ export class Runner {
|
||||||
.catch((e: Error) => {
|
.catch((e: Error) => {
|
||||||
throw new RunnerLogoutError(e)
|
throw new RunnerLogoutError(e)
|
||||||
})
|
})
|
||||||
|
this.session = undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
private async makeReservation(reservation: Reservation) {
|
private async makeReservation(reservation: Reservation) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue