« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/things/news-entry.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/data/things/news-entry.js')
-rw-r--r--src/data/things/news-entry.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/data/things/news-entry.js b/src/data/things/news-entry.js
index 43d1638e..bb35d11b 100644
--- a/src/data/things/news-entry.js
+++ b/src/data/things/news-entry.js
@@ -1,20 +1,23 @@
 export const NEWS_DATA_FILE = 'news.yaml';
 
+import {V} from '#composite';
 import {sortChronologically} from '#sort';
 import Thing from '#thing';
 import {parseDate} from '#yaml';
 
+import {exposeConstant} from '#composite/control-flow';
 import {contentString, directory, name, simpleDate}
   from '#composite/wiki-properties';
 
 export class NewsEntry extends Thing {
   static [Thing.referenceType] = 'news-entry';
   static [Thing.friendlyName] = `News Entry`;
+  static [Thing.wikiData] = 'newsData';
 
   static [Thing.getPropertyDescriptors] = () => ({
     // Update & expose
 
-    name: name('Unnamed News Entry'),
+    name: name(V('Unnamed News Entry')),
     directory: directory(),
     date: simpleDate(),
 
@@ -22,6 +25,8 @@ export class NewsEntry extends Thing {
 
     // Expose only
 
+    isNewsEntry: exposeConstant(V(true)),
+
     contentShort: {
       flags: {expose: true},
 
@@ -64,8 +69,6 @@ export class NewsEntry extends Thing {
     documentMode: allInOne,
     documentThing: NewsEntry,
 
-    save: (results) => ({newsData: results}),
-
     sort({newsData}) {
       sortChronologically(newsData, {latestFirst: true});
     },