grab also version footer in dashboard

This commit is contained in:
Lukas-Heiligenbrunner 2020-02-25 11:31:26 +01:00
parent b3960653ca
commit 8a0396ab2d

View File

@ -15,5 +15,12 @@ class Dashboard {
document.getElementById("total-city-number-label")?.innerHTML = json["citynumber"] as String
} }
window.fetch("/senddata/wastedata", RequestInit(method = "POST", body = "action=getversionandbuildtime")).then { it -> it.text().then {
val json = JSON.parse<Json>(it)
document.getElementById("version-footer-label")?.innerHTML = "<b>Version</b> " + json["version"] + " <b>Build</b> " + json["buildtime"] as String
} }
}
}