From 4f1494d719d2bb5b37667f3777c7842b78baf93c Mon Sep 17 00:00:00 2001 From: "gwenael.planchon" Date: Thu, 14 Mar 2024 14:58:01 +0100 Subject: [PATCH] remettre l'url --- science-quest/src/components/admin/gestion/Ajout.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/science-quest/src/components/admin/gestion/Ajout.vue b/science-quest/src/components/admin/gestion/Ajout.vue index 3e1f935..a28ec51 100644 --- a/science-quest/src/components/admin/gestion/Ajout.vue +++ b/science-quest/src/components/admin/gestion/Ajout.vue @@ -8,7 +8,7 @@ export default{ const donnees=new FormData(formajouter) //envoyer le form en JSON - fetch("localhost"+"/"+this.endpoint, {method:"POST", body:JSON.stringify(Object.fromEntries(donnees)), headers: {"Content-Type": "application/json"}}) + fetch(REST_API+"/"+this.endpoint, {method:"POST", body:JSON.stringify(Object.fromEntries(donnees)), headers: {"Content-Type": "application/json"}}) //sans le JSON.stringify et Object.fromEntries ca fait une requete en Content-Disposition }, typeDeChamp: function(champ){ //TODO mettre cette fonction dans un fichier commun