mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-04 11:24:35 -05:00
Feature/gql about webui query (#773)
* Rename "about" query to "aboutServer" * Add "about" query for webUI
This commit is contained in:
@@ -10,7 +10,7 @@ import suwayomi.tachidesk.server.util.WebInterfaceManager
|
||||
import java.util.concurrent.CompletableFuture
|
||||
|
||||
class InfoQuery {
|
||||
data class AboutPayload(
|
||||
data class AboutServerPayload(
|
||||
val name: String,
|
||||
val version: String,
|
||||
val revision: String,
|
||||
@@ -20,8 +20,8 @@ class InfoQuery {
|
||||
val discord: String,
|
||||
)
|
||||
|
||||
fun about(): AboutPayload {
|
||||
return AboutPayload(
|
||||
fun aboutServer(): AboutServerPayload {
|
||||
return AboutServerPayload(
|
||||
BuildConfig.NAME,
|
||||
BuildConfig.VERSION,
|
||||
BuildConfig.REVISION,
|
||||
@@ -51,6 +51,12 @@ class InfoQuery {
|
||||
}
|
||||
}
|
||||
|
||||
fun aboutWebUI(): CompletableFuture<WebUIUpdateInfo> {
|
||||
return future {
|
||||
WebInterfaceManager.getAboutInfo()
|
||||
}
|
||||
}
|
||||
|
||||
fun checkForWebUIUpdate(): CompletableFuture<WebUIUpdateInfo> {
|
||||
return future {
|
||||
val (version, updateAvailable) = WebInterfaceManager.isUpdateAvailable()
|
||||
|
||||
Reference in New Issue
Block a user