From 52988f62999851c13a0e9ec64decd6a5737e63f6 Mon Sep 17 00:00:00 2001 From: Pau Navarro Date: Mon, 9 Jan 2023 08:53:18 +0100 Subject: [PATCH] change request to the backend --- src/pages/Worker/Card/WorkerNotificationsManager.vue | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/pages/Worker/Card/WorkerNotificationsManager.vue b/src/pages/Worker/Card/WorkerNotificationsManager.vue index 989918b26..9be2e4527 100644 --- a/src/pages/Worker/Card/WorkerNotificationsManager.vue +++ b/src/pages/Worker/Card/WorkerNotificationsManager.vue @@ -210,16 +210,10 @@ async function toggleNotif(notif, chip) { message: t('worker.notificationsManager.subscribed'), }); } else { - const token = await getToken(); - - const tokenUser = await axios.get(`AccessTokens/${token}/user`); - console.log(tokenUser); - await axios.post( `NotificationSubscriptions/deleteNotification`, { - userFk: entityId.value, - notificationFk: notif.id, + notificationId: this.worker.subscribedNotifs.find((sub) => sub.notificationFk == notif.id).id, }, { headers: {