From 78eddef09a4fe595a13733c13cb1230b5f285058 Mon Sep 17 00:00:00 2001 From: Nikolay Martyanov Date: Mon, 15 Jan 2024 19:32:52 +0100 Subject: [PATCH] back: Return 204 status in case of no subregions. It corresponds to the API spec, and the previous value (202) was wrong. Signed-off-by: Nikolay Martyanov --- backend/src/controllers/regionController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/controllers/regionController.js b/backend/src/controllers/regionController.js index 680a434..1ae6a7a 100644 --- a/backend/src/controllers/regionController.js +++ b/backend/src/controllers/regionController.js @@ -185,7 +185,7 @@ async function getSubregions(regionId, hierarchyId, getAll) { } if (subregions.length === 0) { - return { data: [], message: 'Region has no subregions', status: 202 }; + return { data: [], message: 'Region has no subregions', status: 204 }; } return { data: subregions, status: 200 };