diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-01-29 08:22:53 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-01-30 07:59:40 -0400 |
commit | 2960fb60606ce0e356f7cb62c3b17e9d41e742fc (patch) | |
tree | 0976c8866912ed81d757a53c4315361cdf01aed6 /src/data/things/news-entry.js | |
parent | eb8b316bb9af7d34720de1fa8f8dbd4b81513b32 (diff) |
data, yaml: store sorting info on getYamlLoadingSpec
Diffstat (limited to 'src/data/things/news-entry.js')
-rw-r--r-- | src/data/things/news-entry.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/data/things/news-entry.js b/src/data/things/news-entry.js index 658453b0..e0ec7f7b 100644 --- a/src/data/things/news-entry.js +++ b/src/data/things/news-entry.js @@ -57,11 +57,10 @@ export class NewsEntry extends Thing { documentMode: allInOne, documentThing: NewsEntry, - save(newsData) { - sortChronologically(newsData); - newsData.reverse(); + save: (results) => ({newsData: results}), - return {newsData}; + sort({newsData}) { + sortChronologically(newsData, {latestFirst: true}); }, }); } |