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 5335657 commit 43e86e4
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 @@ -141,6 +141,13 @@ exports.searchRegions = async (req, res) => {
};

async function getAllSubregions(regionId, hierarchyId) {
/**
* Retrieves all subregions for a specific 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 subregions.
*/
const query = `
WITH RECURSIVE Subregions AS (
SELECT *
Expand Down

0 comments on commit 43e86e4

Please sign in to comment.