Test
This commit is contained in:
parent
a0bef1245c
commit
7d19236311
|
|
@ -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' });
|
||||
|
|
|
|||
Loading…
Reference in a new issue