Fix successful temperature notification

Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
Christian König
2023-02-26 22:11:10 +01:00
parent 59e1a6f9d5
commit 60883ebdb7
+3 -1
View File
@@ -6,6 +6,7 @@
* Please see LICENSE file for your rights under this license. */
/* global utils:false */
//The following functions allow us to display time until pi-hole is enabled after disabling.
//Works between all pages
@@ -185,8 +186,9 @@ function initCPUtemp() {
var token = encodeURIComponent($("#token").text());
$.getJSON("api.php?setTempUnit=" + unit + "&token=" + token, function (data) {
if (showmsg === true) {
utils.showAlert("info", "", "Setting temperature unit...");
if ("result" in data && data.result === "success") {
utils.showAlert("success", "", "Temperature unit set to " + unit, "");
utils.showAlert("success", "far fa-check-circle", "Temperature unit set to " + unit, "");
} else {
utils.showAlert("error", "", "", "Temperature unit not set");
}