feat: Ajout d'une fonction de dissociation entre un responsable et un

élève
This commit is contained in:
N3WT DE COMPET
2025-03-20 20:28:12 +01:00
parent fb73f9e9a8
commit 3bcc620ee1
9 changed files with 148 additions and 40 deletions

View File

@ -151,4 +151,18 @@ export const fetchTemplatesFromRegistrationFiles = async (id) => {
throw new Error('Erreur lors de la récupération des fichiers associés au groupe');
}
return response.json();
}
}
export const dissociateGuardian = async (studentId, guardianId) => {
const response = await fetch(`${BE_SUBSCRIPTION_STUDENTS_URL}/${studentId}/guardians/${guardianId}/dissociate`, {
credentials: 'include',
method: 'PUT',
headers: {
'Accept': 'application/json',
},
});
if (!response.ok) {
throw new Error('Erreur lors de la dissociation.');
}
return response.json();
};