« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/data/composite/wiki-properties/wikiData.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/data/composite/wiki-properties/wikiData.js b/src/data/composite/wiki-properties/wikiData.js
index 4ea47785..5965b949 100644
--- a/src/data/composite/wiki-properties/wikiData.js
+++ b/src/data/composite/wiki-properties/wikiData.js
@@ -1,17 +1,20 @@
 // General purpose wiki data constructor, for properties like artistData,
 // trackData, etc.
 
-import {validateArrayItems, validateInstanceOf} from '#validators';
+import {validateWikiData} from '#validators';
 
-// TODO: Not templateCompositeFrom.
+// TODO: Kludge.
+import Thing from '../../things/thing.js';
 
-// TODO: This should validate with validateWikiData.
+// TODO: Not templateCompositeFrom.
 
 export default function(thingClass) {
+  const referenceType = thingClass[Thing.referenceType];
+
   return {
     flags: {update: true},
     update: {
-      validate: validateArrayItems(validateInstanceOf(thingClass)),
+      validate: validateWikiData({referenceType}),
     },
   };
 }