fix error not being able to unsubscribe instantly
gitea/salix-front/pipeline/head There was a failure building this commit Details

This commit is contained in:
Pau 2023-01-18 08:23:51 +01:00
parent 52988f6299
commit 9e0adce4f1
1 changed files with 2 additions and 1 deletions

View File

@ -193,7 +193,7 @@ async function toggleNotif(notif, chip) {
notif.active = !notif.active; notif.active = !notif.active;
} }
if (notif.active) { if (notif.active) {
await axios.post( let notificationSubscription = await axios.post(
`NotificationSubscriptions`, `NotificationSubscriptions`,
{ {
notificationFk: notif.id, notificationFk: notif.id,
@ -205,6 +205,7 @@ async function toggleNotif(notif, chip) {
}, },
} }
); );
worker.value.subscribedNotifs.push(notificationSubscription.data);
quasar.notify({ quasar.notify({
type: 'positive', type: 'positive',
message: t('worker.notificationsManager.subscribed'), message: t('worker.notificationsManager.subscribed'),