add responsive+ delete inline style

This commit is contained in:
p2405951
2026-01-12 14:56:01 +01:00
parent a90d52b44b
commit e38fdc11ab
7 changed files with 314 additions and 85 deletions
+8 -16
View File
@@ -1,22 +1,14 @@
export default async function validateUser(userId) {
try {
const res = await fetch(`http://${import.meta.env.VITE_API_URL}/api/users/${userId}/validate`, {
method: 'POST',
credentials: 'include',
const res = await fetch(
`http://${import.meta.env.VITE_API_URL}/api/users/${userId}/validate`,
{
method: "POST",
credentials: "include",
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
Accept: "application/json",
},
});
if (!res.ok) {
throw new Error(`Erreur serveur : ${res.status}`);
}
);
const data = await res.json();
return data;
} catch (err) {
console.error('Erreur lors de la validation :', err);
return null;
}
return res.ok;
}