diff --git a/src/pages/Worker/Card/WorkerNotificationsManager.vue b/src/pages/Worker/Card/WorkerNotificationsManager.vue index ff07eb859..44573adca 100644 --- a/src/pages/Worker/Card/WorkerNotificationsManager.vue +++ b/src/pages/Worker/Card/WorkerNotificationsManager.vue @@ -19,16 +19,17 @@ const route = useRoute(); const { t } = useI18n(); const quasar = useQuasar(); const entityId = computed(() => $props.id || route.params.id); +const URL_KEY = 'NotificationSubscriptions'; const active = ref(); const available = ref(); async function toggleNotification(notification) { try { if (!notification.active) { - await axios.delete(`NotificationSubscriptions/${notification.id}`); + await axios.delete(`${URL_KEY}/${notification.id}`); swapEntry(active.value, available.value, notification.notificationFk); } else { - const { data } = await axios.post(`NotificationSubscriptions`, { + const { data } = await axios.post(URL_KEY, { notificationFk: notification.notificationFk, userFk: entityId.value, }); @@ -63,8 +64,8 @@ function setNotifications(data) {