« get me outta code hell

data: Artwork: withContentWarningArtTags - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/things/artwork.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2025-07-21 19:13:44 -0300
committer(quasar) nebula <qznebula@protonmail.com>2025-07-21 19:13:44 -0300
commit205aaac86e3b65e29f464cd4caf5d59c71bad14f (patch)
treebd65c64637acf567d7683567dfb3448770ec11ba /src/data/things/artwork.js
parent6e113e6ec8c2264afec85364d2e7f38b546816d3 (diff)
data: Artwork: withContentWarningArtTags
Diffstat (limited to 'src/data/things/artwork.js')
-rw-r--r--src/data/things/artwork.js38
1 files changed, 4 insertions, 34 deletions
diff --git a/src/data/things/artwork.js b/src/data/things/artwork.js
index 4aced874..b5d9cc66 100644
--- a/src/data/things/artwork.js
+++ b/src/data/things/artwork.js
@@ -55,6 +55,7 @@ import {
 } from '#composite/wiki-properties';
 
 import {
+  withArtTags,
   withAttachedArtwork,
   withContainingArtworkList,
   withContribsFromAttachedArtwork,
@@ -209,47 +210,16 @@ export class Artwork extends Thing {
     artTagsFromThingProperty: simpleString(),
 
     artTags: [
-      withResolvedReferenceList({
-        list: input.updateValue({
+      withArtTags({
+        from: input.updateValue({
           validate:
             validateReferenceList(ArtTag[Thing.referenceType]),
         }),
-
-        find: soupyFind.input('artTag'),
-      }),
-
-      exposeDependencyOrContinue({
-        dependency: '#resolvedReferenceList',
-        mode: input.value('empty'),
-      }),
-
-      withPropertyFromAttachedArtwork({
-        property: input.value('artTags'),
-      }),
-
-      exposeDependencyOrContinue({
-        dependency: '#attachedArtwork.artTags',
-      }),
-
-      exitWithoutDependency({
-        dependency: 'artTagsFromThingProperty',
-        value: input.value([]),
-      }),
-
-      withPropertyFromObject({
-        object: 'thing',
-        property: 'artTagsFromThingProperty',
-      }).outputs({
-        ['#value']: '#artTags',
       }),
 
-      exposeDependencyOrContinue({
+      exposeDependency({
         dependency: '#artTags',
       }),
-
-      exposeConstant({
-        value: input.value([]),
-      }),
     ],
 
     referencedArtworksFromThingProperty: simpleString(),