Correction mise à jour jeton authentification

This commit is contained in:
2024-12-12 15:21:58 +01:00
parent 38117ade07
commit 246dae446f
6 changed files with 27 additions and 15 deletions

View File

@ -33,7 +33,7 @@ export const useAddTrainMutation = ({ auth, onPostSuccess, onError }: TrainProps
}).then(resp => resp.json())
},
onSuccess: async (data) => {
if (data.error) {
if (data.statusCode) {
if (onError)
onError({ response: data })
return