mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-04 11:24:35 -05:00
Switch to a new Ktlint Formatter (#705)
* Switch to new Ktlint plugin * Add ktlintCheck to PR builds * Run formatter * Put ktlint version in libs toml * Fix lint * Use Zip4Java from libs.toml
This commit is contained in:
@@ -15,18 +15,19 @@ class UpdateMutation {
|
||||
private val updater by DI.global.instance<IUpdater>()
|
||||
|
||||
data class UpdateLibraryMangaInput(
|
||||
val clientMutationId: String? = null
|
||||
val clientMutationId: String? = null,
|
||||
)
|
||||
|
||||
data class UpdateLibraryMangaPayload(
|
||||
val clientMutationId: String?,
|
||||
val updateStatus: UpdateStatus
|
||||
val updateStatus: UpdateStatus,
|
||||
)
|
||||
|
||||
fun updateLibraryManga(input: UpdateLibraryMangaInput): UpdateLibraryMangaPayload {
|
||||
updater.addCategoriesToUpdateQueue(
|
||||
Category.getCategoryList(),
|
||||
clear = true,
|
||||
forceAll = false
|
||||
forceAll = false,
|
||||
)
|
||||
|
||||
return UpdateLibraryMangaPayload(input.clientMutationId, UpdateStatus(updater.status.value))
|
||||
@@ -34,32 +35,35 @@ class UpdateMutation {
|
||||
|
||||
data class UpdateCategoryMangaInput(
|
||||
val clientMutationId: String? = null,
|
||||
val categories: List<Int>
|
||||
val categories: List<Int>,
|
||||
)
|
||||
|
||||
data class UpdateCategoryMangaPayload(
|
||||
val clientMutationId: String?,
|
||||
val updateStatus: UpdateStatus
|
||||
val updateStatus: UpdateStatus,
|
||||
)
|
||||
|
||||
fun updateCategoryManga(input: UpdateCategoryMangaInput): UpdateCategoryMangaPayload {
|
||||
val categories = transaction {
|
||||
CategoryTable.select { CategoryTable.id inList input.categories }.map {
|
||||
CategoryTable.toDataClass(it)
|
||||
val categories =
|
||||
transaction {
|
||||
CategoryTable.select { CategoryTable.id inList input.categories }.map {
|
||||
CategoryTable.toDataClass(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
updater.addCategoriesToUpdateQueue(categories, clear = true, forceAll = true)
|
||||
|
||||
return UpdateCategoryMangaPayload(
|
||||
clientMutationId = input.clientMutationId,
|
||||
updateStatus = UpdateStatus(updater.status.value)
|
||||
updateStatus = UpdateStatus(updater.status.value),
|
||||
)
|
||||
}
|
||||
|
||||
data class UpdateStopInput(
|
||||
val clientMutationId: String? = null
|
||||
val clientMutationId: String? = null,
|
||||
)
|
||||
|
||||
data class UpdateStopPayload(
|
||||
val clientMutationId: String?
|
||||
val clientMutationId: String?,
|
||||
)
|
||||
|
||||
fun updateStop(input: UpdateStopInput): UpdateStopPayload {
|
||||
|
||||
Reference in New Issue
Block a user