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
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -95,7 +95,9 @@ export default defineComponent({
} }
}, },
async loadNotifications() { 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) { to(n, index) {
const to = { const to = {