feat: Nommage des templates / Intégration dans formulaire d'inscription

parent [#22]
This commit is contained in:
N3WT DE COMPET
2025-03-01 22:08:00 +01:00
parent b52b265835
commit eb81bbba92
12 changed files with 142 additions and 81 deletions

View File

@ -138,4 +138,17 @@ export async function getRegisterFormFileTemplate(fileId) {
throw new Error('Failed to fetch file template');
}
return response.json();
}
export const fetchTemplatesFromRegistrationFiles = async (id) => {
const response = await fetch(`${BE_SUBSCRIPTION_REGISTERFORMS_URL}/${id}/templates`, {
credentials: 'include',
headers: {
'Accept': 'application/json',
}
});
if (!response.ok) {
throw new Error('Erreur lors de la récupération des fichiers associés au groupe');
}
return response.json();
}