From dc808af7addaad28d5737d8174691a56f60f2af2 Mon Sep 17 00:00:00 2001 From: Nishant Arora Date: Fri, 6 Jan 2017 22:28:44 +0530 Subject: [PATCH] Article history order fix --- api/articles.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/articles.js b/api/articles.js index f190f4e..7983926 100644 --- a/api/articles.js +++ b/api/articles.js @@ -255,7 +255,7 @@ module.exports = function(app){ */ Articles.where({id: req.params.id}).fetch({withRelated: [{'archives': function(qb) { - qb.orderBy("created_at","DESC"); + qb.orderBy("updated_at","DESC"); }}]}).then(function(article) { res.status(200).json({ error: {