ordering payments

This commit is contained in:
Arjun Patel
2019-05-09 01:52:32 -07:00
parent 102b573ca5
commit f71eea03f6
+2 -1
View File
@@ -19,7 +19,8 @@ exports.getAllChargesbyDonor = async (req, res, next) => {
c.created_at
FROM grants as g
INNER JOIN charges as c on c.grant_id = g.id
WHERE g.donor_id = :donor_id;
WHERE g.donor_id = :donor_id
ORDER BY c.created_at DESC;
`,
{ type: db.sequelize.QueryTypes.SELECT, replacements: { donor_id } }
);