9
0
mirror of https://github.com/Lomanic/presence-button-web synced 2024-11-26 07:27:30 +00:00

📍🏜 Checkpoint

./server.js:933874/1
This commit is contained in:
Glitch (hello-express) 2019-11-03 17:57:00 +00:00
parent 13859b2965
commit 30cf83b999

View File

@ -56,7 +56,7 @@ app.get("/status", (req, res) => {
res.set("WWW-Authenticate", 'Basic realm="Authentication required"'); res.set("WWW-Authenticate", 'Basic realm="Authentication required"');
return res.status(401).send("Authentication required."); return res.status(401).send("Authentication required.");
} }
fuzIsOpen = req.query.fuzisopen == "1"; fuzIsOpen = req.query.fuzisopen === "1";
lastSeen = new Date(); lastSeen = new Date();
try { try {
fs.writeFileSync(db, JSON.stringify({ fuzIsOpen, lastSeen })); fs.writeFileSync(db, JSON.stringify({ fuzIsOpen, lastSeen }));