« get me outta code hell

data, content: Group.closelyLinkedArtists: thing -> artist - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-12-25 17:52:12 -0400
committer(quasar) nebula <qznebula@protonmail.com>2024-12-25 18:10:45 -0400
commit8fbc3499ec5fe6ba7e1d141998ae32fef26fcd2b (patch)
tree551f4182bda47db9d33cef507a5eec9a3c70f367 /src
parentf43c4ba77f5598d5234b21fcd03fa7788b17afe5 (diff)
data, content: Group.closelyLinkedArtists: thing -> artist
Diffstat (limited to 'src')
-rw-r--r--src/content/dependencies/generateGroupInfoPage.js6
-rw-r--r--src/data/things/group.js9
2 files changed, 10 insertions, 5 deletions
diff --git a/src/content/dependencies/generateGroupInfoPage.js b/src/content/dependencies/generateGroupInfoPage.js
index 90cbb970..7b9c2afa 100644
--- a/src/content/dependencies/generateGroupInfoPage.js
+++ b/src/content/dependencies/generateGroupInfoPage.js
@@ -57,13 +57,11 @@ export default {
 
     closeArtistLinks:
       query.generalLinkedArtists
-        .map(({thing: artist}) =>
-          relation('linkArtist', artist)),
+        .map(({artist}) => relation('linkArtist', artist)),
 
     aliasArtistLinks:
       query.aliasLinkedArtists
-        .map(({thing: artist}) =>
-          relation('linkArtist', artist)),
+        .map(({artist}) => relation('linkArtist', artist)),
 
     visitLinks:
       group.urls
diff --git a/src/data/things/group.js b/src/data/things/group.js
index 4a790140..68f7545d 100644
--- a/src/data/things/group.js
+++ b/src/data/things/group.js
@@ -34,6 +34,9 @@ export class Group extends Thing {
       class: input.value(Artist),
       find: input.value(find.artist),
       data: 'artistData',
+
+      reference: input.value('artist'),
+      thing: input.value('artist'),
     }),
 
     featuredAlbums: referenceList({
@@ -123,7 +126,11 @@ export class Group extends Thing {
 
       'Closely Linked Artists': {
         property: 'closelyLinkedArtists',
-        transform: parseAnnotatedReferences,
+        transform: value =>
+          parseAnnotatedReferences(value, {
+            referenceField: 'Artist',
+            referenceProperty: 'artist',
+          }),
       },
 
       'Featured Albums': {property: 'featuredAlbums'},