Fixed Worship order
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user