This commit is contained in:
Christopher Cookman 2026-01-25 15:32:18 -07:00
parent a0bef1245c
commit 7d19236311

View file

@ -8,7 +8,7 @@ router.post('/', global.auth, async (req, res) => {
return res.status(400).json({ error: 'Missing required fields' });
}
db.get('SELECT * FROM analytics WHERE id = ?', [serverId], (err, row) => {
db.get('SELECT * FROM analytics WHERE id = ? AND endTime IS NULL', [serverId], (err, row) => {
if (err) {
console.error('Failed to find server for heartbeat', err);
return res.status(500).json({ error: 'Database error' });