diff --git a/rsconcept/frontend/src/backend/api-transport.ts b/rsconcept/frontend/src/backend/api-transport.ts index ef0add70..8a88c449 100644 --- a/rsconcept/frontend/src/backend/api-transport.ts +++ b/rsconcept/frontend/src/backend/api-transport.ts @@ -8,6 +8,7 @@ import { type z, ZodError } from 'zod'; import { buildConstants } from '@/utils/build-constants'; import { PARAMETER } from '@/utils/constants'; import { errorMsg } from '@/utils/labels'; +import { type RO } from '@/utils/meta'; import { extractErrorMessage } from '@/utils/utils'; export { AxiosError } from 'axios'; @@ -58,7 +59,7 @@ export function axiosGet({ endpoint, options, schema }: IAxiosGetR .get(endpoint, options) .then(response => { schema?.parse(response.data); - return response.data; + return response.data as RO; }) .catch((error: Error | AxiosError) => { // Note: Ignore cancellation errors @@ -81,7 +82,7 @@ export function axiosPost({ .then(response => { schema?.parse(response.data); notifySuccess(response.data, request?.successMessage); - return response.data; + return response.data as RO; }) .catch((error: Error | AxiosError | ZodError) => { notifyError(error); @@ -100,7 +101,7 @@ export function axiosDelete({ .then(response => { schema?.parse(response.data); notifySuccess(response.data, request?.successMessage); - return response.data; + return response.data as RO; }) .catch((error: Error | AxiosError | ZodError) => { notifyError(error); @@ -119,7 +120,7 @@ export function axiosPatch({ .then(response => { schema?.parse(response.data); notifySuccess(response.data, request?.successMessage); - return response.data; + return response.data as RO; }) .catch((error: Error | AxiosError | ZodError) => { notifyError(error); diff --git a/rsconcept/frontend/src/components/input/combo-box.tsx b/rsconcept/frontend/src/components/input/combo-box.tsx index baeecb38..714ad927 100644 --- a/rsconcept/frontend/src/components/input/combo-box.tsx +++ b/rsconcept/frontend/src/components/input/combo-box.tsx @@ -11,7 +11,7 @@ import { cn } from '../utils'; interface ComboBoxProps