« 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/group/Group.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/data/things/group/Group.js')
-rw-r--r--src/data/things/group/Group.js46
1 files changed, 0 insertions, 46 deletions
diff --git a/src/data/things/group/Group.js b/src/data/things/group/Group.js
index b065f9a3..6f698682 100644
--- a/src/data/things/group/Group.js
+++ b/src/data/things/group/Group.js
@@ -1,5 +1,3 @@
-const GROUP_DATA_FILE = 'groups.yaml';
-
 import {input, V} from '#composite';
 import Thing from '#thing';
 import {isBoolean} from '#validators';
@@ -185,48 +183,4 @@ export class Group extends Thing {
       'Review Points': {ignore: true},
     },
   };
-
-  static [Thing.getYamlLoadingSpec] = ({
-    documentModes: {allInOne},
-    thingConstructors: {Group, GroupCategory},
-  }) => ({
-    title: `Process groups file`,
-    file: GROUP_DATA_FILE,
-
-    documentMode: allInOne,
-    documentThing: document =>
-      ('Category' in document
-        ? GroupCategory
-        : Group),
-
-    connect(results) {
-      let groupCategory;
-      let groupRefs = [];
-
-      if (results[0] && !(results[0] instanceof GroupCategory)) {
-        throw new Error(`Expected a category at top of group data file`);
-      }
-
-      for (const thing of results) {
-        if (thing instanceof GroupCategory) {
-          if (groupCategory) {
-            Object.assign(groupCategory, {groups: groupRefs});
-          }
-
-          groupCategory = thing;
-          groupRefs = [];
-        } else {
-          groupRefs.push(Thing.getReference(thing));
-        }
-      }
-
-      if (groupCategory) {
-        Object.assign(groupCategory, {groups: groupRefs});
-      }
-    },
-
-    // Groups aren't sorted at all, always preserving the order in the data
-    // file as-is.
-    sort: null,
-  });
 }