diff --git a/controllers/worshipController.js b/controllers/worshipController.js index 13b65bd..5fd04a3 100644 --- a/controllers/worshipController.js +++ b/controllers/worshipController.js @@ -36,7 +36,8 @@ exports.getAllWorships = async (req, res) => { }, attributes: authorized ? undefined : { exclude: ['sacristanService'] }, order: [ - ['date', 'DESC'] + ['date', 'ASC'], + ['time', 'ASC'] ], }); res.status(200).json(worships); @@ -108,7 +109,10 @@ exports.getFilteredWorships = async (req, res) => { model: EventPlace, as: 'eventPlace', }, - order: [order.split(' ')], + order: [ + ['date', 'ASC'], + ['time', 'ASC'] + ], }); res.status(200).json(worships); } catch (error) {