fix(web): remove prefixos /api/v1 hardcoded nas queries ping e clients
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -27,7 +27,7 @@ export function useClientList(params: Partial<ClientListQuery> = {}) {
|
||||
return useQuery<ClientListResponse, Error>({
|
||||
queryKey: CLIENT_KEYS.list(params),
|
||||
queryFn: async () => {
|
||||
const raw = await apiFetch(`/api/v1/clients${query ? `?${query}` : ''}`);
|
||||
const raw = await apiFetch(`/clients${query ? `?${query}` : ''}`);
|
||||
return ClientListResponseSchema.parse(raw);
|
||||
},
|
||||
});
|
||||
@@ -37,7 +37,7 @@ export function useClientDetail(id: string) {
|
||||
return useQuery<ClientDetail, Error>({
|
||||
queryKey: CLIENT_KEYS.detail(id),
|
||||
queryFn: async () => {
|
||||
const raw = await apiFetch(`/api/v1/clients/${id}`);
|
||||
const raw = await apiFetch(`/clients/${id}`);
|
||||
return ClientDetailSchema.parse(raw);
|
||||
},
|
||||
enabled: !!id,
|
||||
|
||||
@@ -16,7 +16,7 @@ export function useApiPing() {
|
||||
return useQuery<PingResponse, Error>({
|
||||
queryKey: PING_QUERY_KEY,
|
||||
queryFn: async () => {
|
||||
const raw = await apiFetch('/api/v1/ping');
|
||||
const raw = await apiFetch('/ping');
|
||||
return PingResponseSchema.parse(raw);
|
||||
},
|
||||
refetchInterval: 30_000,
|
||||
|
||||
Reference in New Issue
Block a user