diff --git a/customer-vue/src/api/notification.js b/customer-vue/src/api/notification.js index 12440df..f0c753b 100644 --- a/customer-vue/src/api/notification.js +++ b/customer-vue/src/api/notification.js @@ -1,9 +1,19 @@ import axios from "axios"; -const url = process.env.VUE_APP_CUSTOMER_SERVICE_BASEURL + "/notification-service/notification"; +const url = process.env.VUE_APP_CUSTOMER_SERVICE_BASEURL + "/notification-service"; export default { requestNotification() { - return axios.get(url); + return axios.get(url + "/notifications"); + }, + patchNotification(id, isRead) { + const body = { + read: isRead + } + + return axios.patch(url + "/notification/" + id, body) + }, + countsNotification() { + return axios.get(url + "/api/notification/counts"); } } \ No newline at end of file diff --git a/customer-vue/src/components/AppNavigation.vue b/customer-vue/src/components/AppNavigation.vue index b75d874..a6456a2 100644 --- a/customer-vue/src/components/AppNavigation.vue +++ b/customer-vue/src/components/AppNavigation.vue @@ -20,8 +20,8 @@ @click="goNotification" > @@ -34,17 +34,9 @@ diff --git a/customer-vue/src/views/NotificationView.vue b/customer-vue/src/views/NotificationView.vue index 712b2c1..6f3f810 100644 --- a/customer-vue/src/views/NotificationView.vue +++ b/customer-vue/src/views/NotificationView.vue @@ -16,13 +16,13 @@ @@ -35,7 +35,7 @@