Skip to content

Commit

Permalink
Merge pull request #988 from betagouv/main
Browse files Browse the repository at this point in the history
MEP [TRELLO-2598] Sort categories for mobile
  • Loading branch information
charlescd authored Dec 19, 2024
2 parents 7715fd1 + fed3d11 commit c0fde68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mobile-tools/src/controllers/categories.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const CategoriesController = Router()
CategoriesController.get('/', async (req: Request<{}, {}, {}, QueryParams>, res, next) => {
try {
const lang = req.query.lang ?? 'fr'
return res.status(200).send(categories[lang])
return res.status(200).send(categories[lang].sort((a, b) => Number(a.id) - Number(b.id)))
} catch (err) {
next(err)
}
Expand Down

0 comments on commit c0fde68

Please sign in to comment.