From 3a448e4352db9491150ccfc083806b576421202c Mon Sep 17 00:00:00 2001 From: Guillaume Grossetie Date: Wed, 26 Feb 2025 12:54:57 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20corrige=20l'=C3=A9crasement=20de=20varia?= =?UTF-8?q?bles=20query?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/components/corpus/CorpusSelectItem.jsx | 6 ++++-- front/src/components/workspace/WorkspaceSelectItem.jsx | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/front/src/components/corpus/CorpusSelectItem.jsx b/front/src/components/corpus/CorpusSelectItem.jsx index df517570f..3c41f6e65 100644 --- a/front/src/components/corpus/CorpusSelectItem.jsx +++ b/front/src/components/corpus/CorpusSelectItem.jsx @@ -18,9 +18,11 @@ export default function CorpusSelectItem({ async (event) => { event.preventDefault() const [corpusId, checked] = [event.target.value, event.target.checked] - const query = checked ? addArticleToCorpus : removeArticleFromCorpus + const graphqlQuery = checked + ? addArticleToCorpus + : removeArticleFromCorpus await query({ - query, + query: graphqlQuery, variables: { articleId: articleId, corpusId: corpusId }, }) onChange({ corpusId }) diff --git a/front/src/components/workspace/WorkspaceSelectItem.jsx b/front/src/components/workspace/WorkspaceSelectItem.jsx index b8618e5c5..4a12f4691 100644 --- a/front/src/components/workspace/WorkspaceSelectItem.jsx +++ b/front/src/components/workspace/WorkspaceSelectItem.jsx @@ -21,9 +21,9 @@ export default function WorkspaceSelectItem({ async (event) => { event.preventDefault() const [id, checked] = [event.target.value, event.target.checked] - const query = checked ? addArticle : removeArticle + const graphqlQuery = checked ? addArticle : removeArticle await query({ - query, + query: graphqlQuery, variables: { articleId: articleId, workspaceId: id }, }) onChange({ workspaceId: id })