« get me outta code hell

wikiData.js « wiki-properties « composite « data « src - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/composite/wiki-properties/wikiData.js
blob: 5965b9496464ae857db01e7d752348881670bc6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// General purpose wiki data constructor, for properties like artistData,
// trackData, etc.

import {validateWikiData} from '#validators';

// TODO: Kludge.
import Thing from '../../things/thing.js';

// TODO: Not templateCompositeFrom.

export default function(thingClass) {
  const referenceType = thingClass[Thing.referenceType];

  return {
    flags: {update: true},
    update: {
      validate: validateWikiData({referenceType}),
    },
  };
}