From 49089ffac9e345f6ec7c722deb801e10ec04758b Mon Sep 17 00:00:00 2001 From: zavarin-michael Date: Fri, 23 Aug 2024 12:38:22 +0500 Subject: [PATCH] trying to fix build error in transformResponse --- apps/schools/domains/organization/redux/organizationApi.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/schools/domains/organization/redux/organizationApi.ts b/apps/schools/domains/organization/redux/organizationApi.ts index bd63a421..4c9563fa 100644 --- a/apps/schools/domains/organization/redux/organizationApi.ts +++ b/apps/schools/domains/organization/redux/organizationApi.ts @@ -73,7 +73,7 @@ const organizationApi = commonApi.injectEndpoints({ }), transformResponse: (response: ReturnedData) => { return mapReturnedData(response, (query) => { - const transformedQuery = structuredClone(query) + const transformedQuery = structuredClone(query) as unknown as TableTypeStudent transformedQuery.id = query.id transformedQuery.student_name = query.name transformedQuery.student_phone = query.student_profile.phone @@ -182,7 +182,7 @@ const organizationApi = commonApi.injectEndpoints({ }), transformResponse: (response: ReturnedData) => { return mapReturnedData(response, (query) => { - const transformedQuery = structuredClone(query) + const transformedQuery = structuredClone(query) as unknown as TableTypeStudent transformedQuery.id = query.body.id || '' transformedQuery.student_name = query.body.name transformedQuery.student_phone = query.additional.phone