Added tags to chapters in API.

This commit is contained in:
DebaucheryLibrarian 2021-02-27 17:19:07 +01:00
parent e55bc1ef33
commit a45c5f8f37
1 changed files with 8 additions and 0 deletions

View File

@ -52,6 +52,13 @@ const releaseFields = `
duration
title
description
tags: chaptersTags {
tag {
id
name
slug
}
}
poster: chaptersPosterByChapterId {
media {
id
@ -204,6 +211,7 @@ function curateGraphqlRelease(release) {
tags: release.tags.map(tag => tag.tag),
...(release.chapters && { chapters: release.chapters.map(chapter => ({
...chapter,
tags: chapter.tags.map(tag => tag.tag),
poster: chapter.poster?.media || null,
photos: chapter.photos.map(photo => photo.media),
})) }),