fix : correction du useApi pour qu'il n'y ait plus de retry lors d'une erreur 500 par exemple

This commit is contained in:
2026-01-13 16:39:51 +01:00
parent 0c85e48ff4
commit cbcaacf8e3

View File

@@ -14,7 +14,7 @@ export type ApiClient = {
export const useApi = (): ApiClient => { export const useApi = (): ApiClient => {
const config = useRuntimeConfig() const config = useRuntimeConfig()
const baseURL = config.public.apiBase ?? '/api' const baseURL = config.public.apiBase ?? '/api'
const client = $fetch.create({ baseURL }) const client = $fetch.create({ baseURL, retry: 0 })
const request = <T>( const request = <T>(
method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE', method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE',