Skip to content

Commit

Permalink
refactor(mavat): comment out proxy logic
Browse files Browse the repository at this point in the history
  • Loading branch information
yossi-eynav committed May 5, 2024
1 parent 261f791 commit 20dbf6b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions server/api/lib/mavat/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,14 +202,14 @@ const fetchPlanData = (planId) =>
} catch (e) {}

Log.error({ message: 'Mavat fetch error with puppeteer', error: e, innerHTML, planId});
try {
const jsonContent = await proxy.get(`https://mavat.iplan.gov.il/rest/api/SV4/1?mid=${planId}`);
Log.info({ message: 'Mavat with proxy response', jsonContent })
resolve({ data: JSON.parse(jsonContent) });
} catch (e) {
Log.error({ message: 'Mavat fetch error with proxy', error: e });
reject(e);
}
// try {
// const jsonContent = await proxy.get(`https://mavat.iplan.gov.il/rest/api/SV4/1?mid=${planId}`);
// Log.info({ message: 'Mavat with proxy response', jsonContent })
// resolve({ data: JSON.parse(jsonContent) });
// } catch (e) {
// Log.error({ message: 'Mavat fetch error with proxy', error: e });
// reject(e);
// }
}
})();
});
Expand Down

0 comments on commit 20dbf6b

Please sign in to comment.