fix: use a new notification service on every poll to make sure it uses a non-expired token

This commit is contained in:
kolaente 2022-05-08 12:04:48 +02:00
parent a38bd7e971
commit 3e7f598ee8
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 3 additions and 1 deletions

View File

@ -95,7 +95,9 @@ export default defineComponent({
}
},
async loadNotifications() {
this.allNotifications = await this.notificationService.getAll()
// We're recreating the notification service here to make sure it uses the latest api user token
const notificationService = new NotificationService()
this.allNotifications = await notificationService.getAll()
},
to(n, index) {
const to = {