From 38c520b9d570a3f67de68bbcb5ed6b12aa664a94 Mon Sep 17 00:00:00 2001 From: "Glitch (hello-express)" Date: Wed, 25 Mar 2020 11:51:27 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=8B=F0=9F=92=81=20Checkpoint=20./serve?= =?UTF-8?q?r.js:933874/13077?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server.js | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/server.js b/server.js index 5dfd5fd..cc496e7 100644 --- a/server.js +++ b/server.js @@ -59,12 +59,21 @@ app.get("/api", (req, res) => { "Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept" ); - res.send({ - fuzIsOpen, - lastSeen, - lastClosed, - processUptime: new Date(process.uptime() * 1000).toISOString().substr(11, 8) - }); + res.header("Content-Type", "application/json"); + res.send( + JSON.stringify( + { + fuzIsOpen, + lastSeen, + lastClosed, + processUptime: new Date(process.uptime() * 1000) + .toISOString() + .substr(11, 8) + }, + null, + 4 + ) + ); }); app.get("/status", (req, res) => {