add responsive+ delete inline style
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user