Skip to content

Commit

Permalink
back: Return 204 status in case of no subregions.
Browse files Browse the repository at this point in the history
It corresponds to the API spec, and the previous value (202) was wrong.

Signed-off-by: Nikolay Martyanov <[email protected]>
  • Loading branch information
OhmSpectator committed Jan 15, 2024
1 parent 9f334bf commit 78eddef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/controllers/regionController.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down

0 comments on commit 78eddef

Please sign in to comment.