Photo du bénévole ajoutée par la coordination
Section « Photo » sur la fiche bénévole (ajouter / remplacer / retirer),
PUT/DELETE /editions/{id}/volunteers/{vid}/photo (COORDINATION),
validation de l'image partagée avec le formulaire public (read_photo).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
54cba467fc
commit
6892e0307d
@@ -155,6 +155,13 @@ export function createHttpApi(baseUrl: string): PlanningApi {
|
||||
planning: (editionId, id) =>
|
||||
request(`${base(editionId)}/volunteers/${id}/planning`),
|
||||
photoBlob: (editionId, id) => requestBlob(`${base(editionId)}/volunteers/${id}/photo`),
|
||||
setPhoto: (editionId, id, file: File) => {
|
||||
const form = new FormData();
|
||||
form.append('file', file);
|
||||
return request(`${base(editionId)}/volunteers/${id}/photo`, { method: 'PUT', body: form });
|
||||
},
|
||||
removePhoto: (editionId, id) =>
|
||||
request(`${base(editionId)}/volunteers/${id}/photo`, { method: 'DELETE' }),
|
||||
exportXlsx: async (editionId) => {
|
||||
const blob = await requestBlob(`${base(editionId)}/volunteers/export`);
|
||||
if (!blob) throw new ApiError(500, 'error.generic', []);
|
||||
|
||||
Reference in New Issue
Block a user