« 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/track
diff options
context:
space:
mode:
Diffstat (limited to 'src/data/composite/things/track')
-rw-r--r--src/data/composite/things/track/withAlwaysReferenceByDirectory.js4
-rw-r--r--src/data/composite/things/track/withOriginalRelease.js10
2 files changed, 4 insertions, 10 deletions
diff --git a/src/data/composite/things/track/withAlwaysReferenceByDirectory.js b/src/data/composite/things/track/withAlwaysReferenceByDirectory.js
index e01720b4..26c5ba97 100644
--- a/src/data/composite/things/track/withAlwaysReferenceByDirectory.js
+++ b/src/data/composite/things/track/withAlwaysReferenceByDirectory.js
@@ -9,6 +9,7 @@ import {isBoolean} from '#validators';
 
 import {withPropertyFromObject} from '#composite/data';
 import {withResolvedReference} from '#composite/wiki-data';
+import {soupyFind} from '#composite/wiki-properties';
 
 import {
   exitWithoutDependency,
@@ -31,8 +32,7 @@ export default templateCompositeFrom({
     // recurse back into alwaysReferenceByDirectory!
     withResolvedReference({
       ref: 'dataSourceAlbum',
-      data: 'albumData',
-      find: input.value(find.album),
+      find: soupyFind.input('album'),
     }).outputs({
       '#resolvedReference': '#album',
     }),
diff --git a/src/data/composite/things/track/withOriginalRelease.js b/src/data/composite/things/track/withOriginalRelease.js
index c7f49657..59302eac 100644
--- a/src/data/composite/things/track/withOriginalRelease.js
+++ b/src/data/composite/things/track/withOriginalRelease.js
@@ -11,18 +11,13 @@ import {validateWikiData} from '#validators';
 import {exitWithoutDependency, withResultOfAvailabilityCheck}
   from '#composite/control-flow';
 import {withResolvedReference} from '#composite/wiki-data';
+import {soupyFind} from '#composite/wiki-properties';
 
 export default templateCompositeFrom({
   annotation: `withOriginalRelease`,
 
   inputs: {
     selfIfOriginal: input({type: 'boolean', defaultValue: false}),
-
-    data: input({
-      validate: validateWikiData({referenceType: 'track'}),
-      defaultDependency: 'trackData',
-    }),
-
     notFoundValue: input({defaultValue: null}),
   },
 
@@ -55,8 +50,7 @@ export default templateCompositeFrom({
 
     withResolvedReference({
       ref: 'originalReleaseTrack',
-      data: input('data'),
-      find: input.value(find.track),
+      find: soupyFind.input('track'),
     }),
 
     exitWithoutDependency({