Skip to content

Commit

Permalink
Changed datesArr to updateArr
Browse files Browse the repository at this point in the history
  • Loading branch information
dallascrichmond committed Jul 24, 2023
1 parent c58c19a commit b2dca99
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/controllers/location-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<UpdateDate> = 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) => (
Expand Down
1 change: 1 addition & 0 deletions src/frontend-pwa/src/services/app/useAppService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit b2dca99

Please sign in to comment.