« 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/artist.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/data/things/artist.js')
-rw-r--r--src/data/things/artist.js19
1 files changed, 6 insertions, 13 deletions
diff --git a/src/data/things/artist.js b/src/data/things/artist.js
index 2676591a..7a9dbd3c 100644
--- a/src/data/things/artist.js
+++ b/src/data/things/artist.js
@@ -33,7 +33,12 @@ export class Artist extends Thing {
     },
 
     isAlias: flag(),
-    aliasedArtistRef: singleReference(Artist),
+
+    aliasedArtist: singleReference({
+      class: Artist,
+      find: find.artist,
+      data: 'artistData',
+    }),
 
     // Update only
 
@@ -44,18 +49,6 @@ export class Artist extends Thing {
 
     // Expose only
 
-    aliasedArtist: {
-      flags: {expose: true},
-
-      expose: {
-        dependencies: ['artistData', 'aliasedArtistRef'],
-        compute: ({artistData, aliasedArtistRef}) =>
-          aliasedArtistRef && artistData
-            ? find.artist(aliasedArtistRef, artistData, {mode: 'quiet'})
-            : null,
-      },
-    },
-
     tracksAsArtist:
       Artist.filterByContrib('trackData', 'artistContribs'),
     tracksAsContributor: