Fixed Worship order

This commit is contained in:
Torsten Schulz
2024-09-06 23:39:02 +02:00
parent 5c6cfa41ab
commit 8066bedb30

View File

@@ -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) {