1
Fork 0
mirror of https://github.com/RGBCube/GDUS synced 2025-07-28 13:37:45 +00:00

Fix super high reminders

This commit is contained in:
RGBCube 2024-01-08 14:46:02 +03:00
parent 6ea93100f9
commit 1b15f3798f
No known key found for this signature in database

View file

@ -14,7 +14,7 @@ const alertIfTime = () => {
reminders.forEach(reminder => {
const differenceSeconds = currentTime - reminder.timestamp;
if (differenceSeconds < 1 * 60) {
if (differenceSeconds < 60 && differenceSeconds > -30) {
if (reminder.led != 0) fetch("http://localhost:3000/led/toggle?" + new URLSearchParams({ number: reminder.led })).then(console.log);
fetch("http://localhost:3000/speak?" + new URLSearchParams({ text: reminder.content })).then(console.log);
}