move utils files

This commit is contained in:
Giovanni committed 2025-12-17 14:16:08 +01:00
1 parent 883b9b6c4b
commit 0aaafed26a
13 files changed
+58 -9

No files matched your search

@@ -0,0 +1,21 @@
export default async function getUserNotifications(id) {
try {
const response = await fetch(
`http://${import.meta.env.VITE_API_URL}/api/users/${id}/notifications`,
{
method: 'GET',
credentials: 'include',
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
}
);
const data = await response.json();
return data.data;
} catch (err) {
console.error("Erreur :", err);
return null;
}
}