From cb057e9299638cb12cd78547a6799417d4169958 Mon Sep 17 00:00:00 2001 From: Nils <34674720+nils-kt@users.noreply.github.com> Date: Sat, 13 Mar 2021 19:52:31 +0100 Subject: [PATCH] Cleanup --- Scriptable/widget.js | 3 ++- Server/main.js | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Scriptable/widget.js b/Scriptable/widget.js index 1e1b634..adce003 100644 --- a/Scriptable/widget.js +++ b/Scriptable/widget.js @@ -1,6 +1,7 @@ // © 2021 Nils Kleinert const backend = "http://192.168.178.77:3000" +const background = "1d1f2f" // HEX //// -- DON'T TOUCH ANY CODE HERE @@ -84,7 +85,7 @@ function printUptime(seconds) { } let widget = await createWidget() -widget.backgroundColor = new Color("1d1f2f") +widget.backgroundColor = new Color(background, 1) if (!config.runsInWidget) { await widget.presentMedium() } diff --git a/Server/main.js b/Server/main.js index d05d3a7..55b97b7 100644 --- a/Server/main.js +++ b/Server/main.js @@ -2,7 +2,7 @@ const config = require("./config.json"), proxmox = require("proxmox-client"), express = require("express"), app = express(), - fs = require('fs'); + fs = require("fs"); proxmox.auth(config.proxmox.hostname, config.proxmox.user, config.proxmox.token).then(() => { @@ -48,12 +48,12 @@ proxmox.auth(config.proxmox.hostname, config.proxmox.user, config.proxmox.token) }); } - app.get('/', (req, res) => { + app.get("/", (req, res) => { res.set("Content-Type", "application/json"); res.send(JSON.stringify(allServers)); }) - app.get('/scriptable', (req, res) => { + app.get("/scriptable", (req, res) => { fs.readFile("../Scriptable/widget.js", "utf8", function (err, data) { if (err) throw err; res.set("Content-Type", "text/plain");