diff --git a/src/api/controllers/location-controller.ts b/src/api/controllers/location-controller.ts index 08bcd91a..41b49091 100644 --- a/src/api/controllers/location-controller.ts +++ b/src/api/controllers/location-controller.ts @@ -103,7 +103,7 @@ export const updatedInfo = async (req: Request, res: Response) => { const responseObject: ReturnObject = {}; if (req.body.updateArr && typeof req.body.updateArr === typeof []) { const datesArr: Array = await dateModel.find({}); - responseObject.datesArr = datesArr; + responseObject.updateArr = datesArr; const promises = req.body.updateArr.map(async (item: UpdateDate) => { if (servicesOffered.includes(item.serviceType)) { const serviceDate: any = datesArr.find((service: UpdateDate) => ( diff --git a/src/frontend-pwa/src/services/app/useAppService.ts b/src/frontend-pwa/src/services/app/useAppService.ts index 161c4806..e9e58106 100644 --- a/src/frontend-pwa/src/services/app/useAppService.ts +++ b/src/frontend-pwa/src/services/app/useAppService.ts @@ -39,6 +39,7 @@ const useAppService = () => { if (isOnline) { try { const data = await axios.get(`${constants.BACKEND_URL}/api/locations`); + console.log('Data: ', data); saveDataToLocalStorage(constants.APP_DATA_KEY, data); dispatch({ type: SET_APP_DATA, payload: data }); } catch (e) {