Fixed Worship order
This commit is contained in:
@@ -36,7 +36,8 @@ exports.getAllWorships = async (req, res) => {
|
|||||||
},
|
},
|
||||||
attributes: authorized ? undefined : { exclude: ['sacristanService'] },
|
attributes: authorized ? undefined : { exclude: ['sacristanService'] },
|
||||||
order: [
|
order: [
|
||||||
['date', 'DESC']
|
['date', 'ASC'],
|
||||||
|
['time', 'ASC']
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
res.status(200).json(worships);
|
res.status(200).json(worships);
|
||||||
@@ -108,7 +109,10 @@ exports.getFilteredWorships = async (req, res) => {
|
|||||||
model: EventPlace,
|
model: EventPlace,
|
||||||
as: 'eventPlace',
|
as: 'eventPlace',
|
||||||
},
|
},
|
||||||
order: [order.split(' ')],
|
order: [
|
||||||
|
['date', 'ASC'],
|
||||||
|
['time', 'ASC']
|
||||||
|
],
|
||||||
});
|
});
|
||||||
res.status(200).json(worships);
|
res.status(200).json(worships);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user