From f6c12658ceb6c2a7dd7a178ff16b6bcfc31ee833 Mon Sep 17 00:00:00 2001 From: Khaled Garbaya Date: Wed, 8 Nov 2017 17:03:38 +0100 Subject: [PATCH] fix: Fix courses ordering --- services/contentful.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/contentful.js b/services/contentful.js index ce00772..68c47ca 100644 --- a/services/contentful.js +++ b/services/contentful.js @@ -66,7 +66,7 @@ module.exports.getCourses = assert((locale = 'en-US', api = `cda`) => { return getClient(api).getEntries({ content_type: 'course', locale, - order: 'sys.createdAt', // Ordering the entries by creation date + order: '-sys.createdAt', // Ordering the entries by creation date include: 6 // We use include param to increase the link level, the include value goes from 1 to 6 }) .then((response) => response.items)