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 { return future {
Chapter.fetchChapterList(mangaId) Chapter.fetchChapterList(mangaId)
}.thenApply { }.thenApply {
val chapters = ChapterTable.select { ChapterTable.manga eq mangaId } val chapters = transaction {
.orderBy(ChapterTable.sourceOrder) ChapterTable.select { ChapterTable.manga eq mangaId }
.map { ChapterType(it) } .orderBy(ChapterTable.sourceOrder)
.map { ChapterType(it) }
}
FetchChaptersPayload( FetchChaptersPayload(
clientMutationId = clientMutationId, clientMutationId = clientMutationId,
chapters = chapters chapters = chapters