update notification routes call
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import getXSRFToken from "../getXSRF.js";
|
||||
|
||||
export default async function deleteNotificationUser(userId, notificationId) {
|
||||
export default async function deleteNotificationUser(notificationId) {
|
||||
const csrfToken = await getXSRFToken();
|
||||
|
||||
try {
|
||||
const res = await fetch(`http://${import.meta.env.VITE_API_URL}/api/users/${userId}/delete/notification/${notificationId}`, {
|
||||
const res = await fetch(`http://${import.meta.env.VITE_API_URL}/api/users/delete/notification/${notificationId}`, {
|
||||
method: 'DELETE',
|
||||
credentials: 'include',
|
||||
headers: {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
export default async function getUserNotifications(id) {
|
||||
export default async function getUserNotifications() {
|
||||
try {
|
||||
const response = await fetch(
|
||||
`http://${import.meta.env.VITE_API_URL}/api/users/${id}/notifications`,
|
||||
`http://${import.meta.env.VITE_API_URL}/api/users/notifications`,
|
||||
{
|
||||
method: 'GET',
|
||||
credentials: 'include',
|
||||
|
||||
Reference in New Issue
Block a user