Skip to content

Commit a59a915

Browse files
committed
Update API.
1 parent 6d9c690 commit a59a915

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

src/composes/services/useNotifications.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@ export const useNotifications = () => {
88
const { request, error, ...rest } = useApi()
99

1010
const getCountUnreadNotifications = async () => {
11-
const response = await request(`/notification/unread`, { indicator: false })
11+
const response = await request(`/notifications/unread`, {
12+
indicator: false,
13+
})
1214
countUnreadNotifications.value = response.data.count
1315
return countUnreadNotifications.value
1416
}
1517

1618
const getNotifications = async (page) => {
17-
const response = await request(`/notification?page=${page}`, {
19+
const response = await request(`/notifications?page=${page}`, {
1820
indicator: false,
1921
})
2022
notifications.value = notifications.value.concat(
@@ -25,7 +27,9 @@ export const useNotifications = () => {
2527
}
2628

2729
const confirmEmail = async (token) => {
28-
const response = await request(`/notification/email/confirm?token=${token}`)
30+
const response = await request(
31+
`/notifications/email/confirm?token=${token}`,
32+
)
2933

3034
if (error.value?.response?.status !== undefined)
3135
throw new Error("Can't confirm email")

0 commit comments

Comments
 (0)