« get me outta code hell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
export default { relations: (relation, track) => ({ trackLink: relation('linkTrack', track), }), data: (track) => ({ albumName: track.album.name, albumColor: track.album.color, }), generate: (data, relations, {language}) => relations.trackLink.slots({ content: language.sanitize(data.albumName), color: data.albumColor, }), };