diff --git a/src/frontend/src/api/OrganisationService.ts b/src/frontend/src/api/OrganisationService.ts index c31641a564..25d7224db0 100644 --- a/src/frontend/src/api/OrganisationService.ts +++ b/src/frontend/src/api/OrganisationService.ts @@ -3,6 +3,7 @@ import { HomeProjectCardModel } from '@/models/home/homeModel'; import { GetOrganisationDataModel, OrganisationModal } from '@/models/organisation/organisationModel'; import { CommonActions } from '@/store/slices/CommonSlice'; import { OrganisationAction } from '@/store/slices/organisationSlice'; +import { API } from '.'; function appendObjectToFormData(formData, object) { for (const [key, value] of Object.entries(object)) { @@ -43,7 +44,7 @@ export const OrganisationDataService: Function = (url: string) => { dispatch(OrganisationAction.GetOrganisationDataLoading(true)); const getOrganisationData = async (url) => { try { - const getOrganisationDataResponse = await axios.get(url); + const getOrganisationDataResponse = await API.get(url); const response: GetOrganisationDataModel = getOrganisationDataResponse.data; dispatch(OrganisationAction.GetOrganisationsData(response)); } catch (error) { diff --git a/src/frontend/src/api/index.js b/src/frontend/src/api/index.ts similarity index 100% rename from src/frontend/src/api/index.js rename to src/frontend/src/api/index.ts