« get me outta code hell

data: misc adaptations for who/what -> artist/annotation - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-04-24 11:14:59 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-05-01 07:06:04 -0300
commit1c6d49fc8beddc2608adf43bd269a2e509cfbb70 (patch)
tree6ecb476de29568f9b5dcff2f9c6ecb0eb435b34a /src/data
parenta6e2493f13636f8586fd177dd493812bbcb09dbd (diff)
data: misc adaptations for who/what -> artist/annotation
Diffstat (limited to 'src/data')
-rw-r--r--src/data/checks.js2
-rw-r--r--src/data/serialize.js5
2 files changed, 5 insertions, 2 deletions
diff --git a/src/data/checks.js b/src/data/checks.js
index 44f3efd7..c0eba0ff 100644
--- a/src/data/checks.js
+++ b/src/data/checks.js
@@ -261,7 +261,7 @@ export function filterReferenceErrors(wikiData, {
                 break;
 
               case '_contrib':
-                findFn = contribRef => findArtistOrAlias(contribRef.who);
+                findFn = contribRef => findArtistOrAlias(contribRef.artist);
                 break;
 
               case '_homepageSourceGroup':
diff --git a/src/data/serialize.js b/src/data/serialize.js
index 8cac3309..2ecbf76c 100644
--- a/src/data/serialize.js
+++ b/src/data/serialize.js
@@ -16,7 +16,10 @@ export function toRefs(things) {
 }
 
 export function toContribRefs(contribs) {
-  return contribs?.map(({who, what}) => ({who: toRef(who), what}));
+  return contribs?.map(({artist, annotation}) => ({
+    artist: toRef(artist),
+    annotation,
+  }));
 }
 
 export function toCommentaryRefs(entries) {