Skip to content

Commit

Permalink
feat: Updated backend/src/controllers/regionContro
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] authored Dec 22, 2023
1 parent b963f88 commit 232db36
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions backend/src/controllers/regionController.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,13 @@ async function getSubregions(regionId, hierarchyId, getAll) {
}

// Retrieve the divisions of a region. It does not include subdivisions of the divisions.
/**
* Retrieves the divisions of a region.
*
* @param {number} regionId - The ID of the region.
* @param {number} hierarchyId - The ID of the hierarchy.
* @returns {Promise<Array>} - A promise that resolves to an array of divisions.
*/
async function getDivisions(regionId, hierarchyId) {
const regions = (await getSubregions(regionId, hierarchyId, false)).data;
// Add the region itself
Expand Down

0 comments on commit 232db36

Please sign in to comment.