diff --git a/backend/src/controllers/regionController.js b/backend/src/controllers/regionController.js index 3d2ea54..5d3b144 100644 --- a/backend/src/controllers/regionController.js +++ b/backend/src/controllers/regionController.js @@ -170,6 +170,14 @@ async function getAllSubregions(regionId, hierarchyId) { } // Retrieve subregions for a specific region +/** + * Retrieves subregions for a specific region. + * + * @param {number} regionId - The ID of the region. + * @param {number} hierarchyId - The ID of the hierarchy. + * @param {boolean} getAll - Whether to retrieve all subregions or only direct subregions. + * @returns {Promise} - A promise that resolves to an object containing the subregions data and status. + */ async function getSubregions(regionId, hierarchyId, getAll) { try { // Check if the region exists