« get me outta code hell

linkReferencedArtworks.js « dependencies « content « src - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies/linkReferencedArtworks.js
blob: f8b3f3c867949b19470205e8529455d2e3d85aad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
export default {
  relations: (relation, artwork) => ({
    link:
      (artwork.thing.isAlbum
        ? relation('linkAlbumReferencedArtworks', artwork.thing)
     : artwork.thing.isTrack
        ? relation('linkTrackReferencedArtworks', artwork.thing)
        : null),
  }),

  generate: (relations) => relations.link,
};