« get me outta code hell

data: contribution: thingProperty - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/things
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-03-04 20:22:42 -0400
committer(quasar) nebula <qznebula@protonmail.com>2024-06-18 22:56:00 -0300
commit32cafa563c289dc5893565afb4133e2a84ac4fcc (patch)
treecdd27a6dc377ed4ac8e85775c53e0197ab9ed0f4 /src/data/things
parent06cf8a27117cf1b77104b75e1e34375f064134ed (diff)
data: contribution: thingProperty
Diffstat (limited to 'src/data/things')
-rw-r--r--src/data/things/contribution.js5
-rw-r--r--src/data/things/track.js2
2 files changed, 7 insertions, 0 deletions
diff --git a/src/data/things/contribution.js b/src/data/things/contribution.js
index dc7f2157..7eb8cfc7 100644
--- a/src/data/things/contribution.js
+++ b/src/data/things/contribution.js
@@ -21,6 +21,11 @@ export class Contribution extends Thing {
       update: {validate: isThing},
     },
 
+    thingProperty: {
+      flags: {update: true, expose: true},
+      update: {validate: isStringNonEmpty},
+    },
+
     artist: [
       withContributionArtist({
         ref: input.updateValue({
diff --git a/src/data/things/track.js b/src/data/things/track.js
index 725b1bb7..11e71151 100644
--- a/src/data/things/track.js
+++ b/src/data/things/track.js
@@ -198,6 +198,7 @@ export class Track extends Thing {
 
       withResolvedContribs({
         from: input.updateValue({validate: isContributionList}),
+        thingProperty: input.thisProperty(),
       }).outputs({
         '#resolvedContribs': '#artistContribs',
       }),
@@ -232,6 +233,7 @@ export class Track extends Thing {
 
       withResolvedContribs({
         from: input.updateValue({validate: isContributionList}),
+        thingProperty: input.thisProperty(),
       }).outputs({
         '#resolvedContribs': '#coverArtistContribs',
       }),