Skip to content

Commit

Permalink
feat: Updated frontend/src/api/index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] authored Dec 14, 2023
1 parent ac7e54b commit 2bbe77d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions frontend/src/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ export const fetchRegion = async (regionId, hierarchyId) => {
};

// Fetch the geometry for a region. Returns null if no geometry is found.
/**
* Fetches the geometry for a given region, hierarchy, and force flag.
* @param {Number} regionId - The ID of the region to fetch the geometry for.
* @param {Number} hierarchyId - The ID of the hierarchy to which the region belongs.
* @param {Boolean} force - If true, resolve empty geometry.
* @returns {Object|null} - The geometry object for the given region and hierarchy, or null if no geometry is found.

Check failure on line 66 in frontend/src/api/index.js

View workflow job for this annotation

GitHub Actions / lint-frontend

This line has a length of 116. Maximum allowed is 100
*/
export const fetchRegionGeometry = async (regionId, hierarchyId, force) => {
try {
const response = await api.get(`/api/regions/${regionId}/geometry`, { params: { resolveEmpty: force, hierarchyId } });
Expand Down

0 comments on commit 2bbe77d

Please sign in to comment.