mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-09 05:44:33 -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,39 +15,41 @@ import suwayomi.tachidesk.server.util.withOperation
|
||||
|
||||
object GlobalMetaController {
|
||||
/** used to modify a category's meta parameters */
|
||||
val getMeta = handler(
|
||||
documentWith = {
|
||||
withOperation {
|
||||
summary("Server level meta mapping")
|
||||
description("Get a list of globally stored key-value mapping, you can set values for whatever you want inside it.")
|
||||
}
|
||||
},
|
||||
behaviorOf = { ctx ->
|
||||
ctx.json(GlobalMeta.getMetaMap())
|
||||
ctx.status(200)
|
||||
},
|
||||
withResults = {
|
||||
httpCode(HttpCode.OK)
|
||||
}
|
||||
)
|
||||
val getMeta =
|
||||
handler(
|
||||
documentWith = {
|
||||
withOperation {
|
||||
summary("Server level meta mapping")
|
||||
description("Get a list of globally stored key-value mapping, you can set values for whatever you want inside it.")
|
||||
}
|
||||
},
|
||||
behaviorOf = { ctx ->
|
||||
ctx.json(GlobalMeta.getMetaMap())
|
||||
ctx.status(200)
|
||||
},
|
||||
withResults = {
|
||||
httpCode(HttpCode.OK)
|
||||
},
|
||||
)
|
||||
|
||||
/** used to modify global meta parameters */
|
||||
val modifyMeta = handler(
|
||||
formParam<String>("key"),
|
||||
formParam<String>("value"),
|
||||
documentWith = {
|
||||
withOperation {
|
||||
summary("Add meta data to the global meta mapping")
|
||||
description("A simple Key-Value stored at server global level, you can set values for whatever you want inside it.")
|
||||
}
|
||||
},
|
||||
behaviorOf = { ctx, key, value ->
|
||||
GlobalMeta.modifyMeta(key, value)
|
||||
ctx.status(200)
|
||||
},
|
||||
withResults = {
|
||||
httpCode(HttpCode.OK)
|
||||
httpCode(HttpCode.NOT_FOUND)
|
||||
}
|
||||
)
|
||||
val modifyMeta =
|
||||
handler(
|
||||
formParam<String>("key"),
|
||||
formParam<String>("value"),
|
||||
documentWith = {
|
||||
withOperation {
|
||||
summary("Add meta data to the global meta mapping")
|
||||
description("A simple Key-Value stored at server global level, you can set values for whatever you want inside it.")
|
||||
}
|
||||
},
|
||||
behaviorOf = { ctx, key, value ->
|
||||
GlobalMeta.modifyMeta(key, value)
|
||||
ctx.status(200)
|
||||
},
|
||||
withResults = {
|
||||
httpCode(HttpCode.OK)
|
||||
httpCode(HttpCode.NOT_FOUND)
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user