From 34bbee2031726558c411138685afac18c28f16d2 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 21 Oct 2024 15:38:46 +0200 Subject: [PATCH] Use makeFetch method --- .../Resources/public/vuejs/_api/OnTheFly.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_api/OnTheFly.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_api/OnTheFly.js index 3c58b67e9..d8f5700ff 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_api/OnTheFly.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_api/OnTheFly.js @@ -25,7 +25,8 @@ const getCivilities = () => }); const getGenders = () => - fetch('/api/1.0/main/gender.json').then(response => { + makeFetch("GET", '/api/1.0/main/gender.json'). + .then(response => { if (response.ok) { return response.json(); } throw Error('Error with request resource response'); }); @@ -69,7 +70,7 @@ const patchPerson = (id, body) => { }; export { - getCentersForPersonCreation, + getCentersForPersonCreation, getPerson, getPersonAltNames, getCivilities,