You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is maybe an error on my side.
But for some reason the result type of trigger is an AxiosResponse inside an AxiosResponse.
exportfunctionUserAuthForm({ className, ...props}: UserAuthFormProps){const{ trigger, isMutating }=useLoginForAccessTokenAuthPostRequest();constform=useForm<z.infer<typeofformSchema>>({resolver: zodResolver(formSchema),defaultValues: {username: "",password: "",},});asyncfunctiononSubmit(values: z.infer<typeofformSchema>){try{// According to the types this is a AxiosResponse<AxiosResponse<Token, any>, any> | undefined// But it is actually a AxiosResponse<Token, any> | undefinedconstresult=awaittrigger({body: {username: values.username,password: values.password}});if(!result){thrownewError("No response");}console.dir(result);console.dir(result.data);// This does not work because the types are wrongconst{ access_token }=result.data.data;
This is my openAPI.json if you want to try openAPI.txt
The text was updated successfully, but these errors were encountered:
You may used wrong useMutationRequest function, the type returned by trigger should be controlled by useMutationRequest function, you can refer to example folder to get more details.
This is maybe an error on my side.
But for some reason the result type of trigger is an
AxiosResponse
inside anAxiosResponse
.This is my openAPI.json if you want to try
openAPI.txt
The text was updated successfully, but these errors were encountered: