Fix update chapters (#557)

This commit is contained in:
Mitchell Syer
2023-05-26 06:15:25 -04:00
committed by GitHub
parent 3f91663ecf
commit 458ca7c7cf

View File

@@ -119,9 +119,12 @@ class ChapterMutation {
return future {
Chapter.fetchChapterList(mangaId)
}.thenApply {
val chapters = ChapterTable.select { ChapterTable.manga eq mangaId }
.orderBy(ChapterTable.sourceOrder)
.map { ChapterType(it) }
val chapters = transaction {
ChapterTable.select { ChapterTable.manga eq mangaId }
.orderBy(ChapterTable.sourceOrder)
.map { ChapterType(it) }
}
FetchChaptersPayload(
clientMutationId = clientMutationId,
chapters = chapters