Skip to content

Commit

Permalink
fix: passe les arguments en tant qu'objet
Browse files Browse the repository at this point in the history
  • Loading branch information
ggrossetie committed Feb 22, 2025
1 parent 09542b3 commit 5bd2867
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions front/src/components/Credentials.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useSelector } from 'react-redux'
import { useTranslation } from 'react-i18next'

import { useGraphQLClient } from '../helpers/graphQL'
import { changePassword as query } from './Credentials.graphql'
import { changePassword as changePasswordQuery } from './Credentials.graphql'
import styles from './credentials.module.scss'
import fieldStyles from './field.module.scss'
import Button from './Button'
Expand Down Expand Up @@ -39,7 +39,7 @@ export default function Credentials() {
new: password,
user: userId,
}
await query({ query, variables })
await query({ query: changePasswordQuery, variables })
setPassword('')
setPasswordO('')
setPasswordC('')
Expand Down
2 changes: 1 addition & 1 deletion front/src/helpers/graphQL.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ async function executeRequest({
export function useGraphQLClient() {
const sessionToken = useSelector((state) => state.sessionToken)
return {
query: (query, variables) =>
query: ({query, variables}) =>
executeQuery({ query, variables, sessionToken }),
}
}
Expand Down

0 comments on commit 5bd2867

Please sign in to comment.