« 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/composite/things/album/withTrackSections.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/data/composite/things/album/withTrackSections.js')
-rw-r--r--src/data/composite/things/album/withTrackSections.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/data/composite/things/album/withTrackSections.js b/src/data/composite/things/album/withTrackSections.js
new file mode 100644
index 00000000..a56bda31
--- /dev/null
+++ b/src/data/composite/things/album/withTrackSections.js
@@ -0,0 +1,21 @@
+import {input, templateCompositeFrom} from '#composite';
+
+import find from '#find';
+
+import {withResolvedReferenceList} from '#composite/wiki-data';
+
+export default templateCompositeFrom({
+  annotation: `withTrackSections`,
+
+  outputs: ['#trackSections'],
+
+  steps: () => [
+    withResolvedReferenceList({
+      list: 'trackSections',
+      data: 'ownTrackSectionData',
+      find: input.value(find.unqualifiedTrackSection),
+    }).outputs({
+      ['#resolvedReferenceList']: '#trackSections',
+    }),
+  ],
+});