mirror of
https://github.com/Lomanic/presence-button-web
synced 2024-11-25 06:57:30 +00:00
🎂😅 Checkpoint
./.glitch-assets:933874/481 ./server.js:933874/3686
This commit is contained in:
parent
6933c9b383
commit
271c453ff0
@ -4,3 +4,5 @@
|
||||
{"uuid":"adSBq97hhhpFNUna","deleted":true}
|
||||
{"uuid":"adSBq97hhhpFNUnb","deleted":true}
|
||||
{"uuid":"adSBq97hhhpFNUnc","deleted":true}
|
||||
{"name":"andre-benz-231286-unsplash.jpg","date":"2019-11-03T14:43:20.698Z","url":"https://cdn.glitch.com/11921fdd-f2f8-4bee-87ed-e6d62732b3b3%2Fandre-benz-231286-unsplash.jpg","type":"image/jpeg","size":5873105,"imageWidth":4236,"imageHeight":6354,"thumbnail":"https://cdn.glitch.com/11921fdd-f2f8-4bee-87ed-e6d62732b3b3%2Fthumbnails%2Fandre-benz-231286-unsplash.jpg","thumbnailWidth":220,"thumbnailHeight":330,"uuid":"uiePUtoXJG2jTqB2"}
|
||||
{"uuid":"uiePUtoXJG2jTqB2","deleted":true}
|
||||
|
@ -23,12 +23,13 @@ app.get("/", (req, res) => {
|
||||
|
||||
// http://expressjs.com/en/starter/basic-routing.html
|
||||
app.get("/img", (req, res) => {
|
||||
res.sendFile(__dirname + "/views/index.html");
|
||||
if (fuzIsOpen && Date() - 2 * 60 * 1000 < lastSeen) {
|
||||
if (fuzIsOpen && Date() - (2 * 60 * 1000) < lastSeen) {
|
||||
return res.sendFile(__dirname + "/views/open.svg");
|
||||
}
|
||||
res.sendFile(__dirname + "/views/closed.svg");
|
||||
});
|
||||
app.get("/api", (req, res) => {
|
||||
res.send(fuzIsOpen && new Date() - 2 * 60 * 1000 < lastSeen);
|
||||
res.send(fuzIsOpen && new Date() - (2 * 60 * 1000) < lastSeen);
|
||||
});
|
||||
|
||||
// http://expressjs.com/en/starter/basic-routing.html
|
||||
|
1
views/closed.svg
Normal file
1
views/closed.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 7.3 KiB |
1
views/open.svg
Normal file
1
views/open.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 5.5 KiB |
Loading…
Reference in New Issue
Block a user