« get me outta code hell

linkArtwork.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/linkArtwork.js
blob: c10150d1a578f51469b841d492357a78e977e62e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
export default {
  contentDependencies: ['linkAlbum', 'linkTrack'],

  relations: (relation, artwork) => ({
    link:
      (artwork.thing.isAlbum
        ? relation('linkAlbum', artwork.thing)
     : artwork.thing.isTrack
        ? relation('linkTrack', artwork.thing)
        : null),
  }),

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