From 027ecb2c5e6d0bed5d0233d53ecb6d3bbf271d6c Mon Sep 17 00:00:00 2001 From: "sweep-ai[bot]" <128439645+sweep-ai[bot]@users.noreply.github.com> Date: Fri, 22 Dec 2023 15:43:59 +0000 Subject: [PATCH] feat: Updated backend/src/controllers/regionContro --- backend/src/controllers/regionController.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/backend/src/controllers/regionController.js b/backend/src/controllers/regionController.js index 8dbe82a..93a65c8 100644 --- a/backend/src/controllers/regionController.js +++ b/backend/src/controllers/regionController.js @@ -254,6 +254,13 @@ async function getDivisions(regionId, hierarchyId) { return resultDivisions; } +/** + * Retrieves all available hierarchies. + * + * @param {Object} req - The request object. + * @param {Object} res - The response object. + * @returns {Promise} - A promise that resolves when the hierarchies are retrieved. + */ exports.getHierarchies = async (req, res) => { try { const hierarchies = await HierarchyNames.findAll();