Actualizar server.js

This commit is contained in:
2026-02-16 07:46:42 +00:00
parent c65241393d
commit 09be1b75f9

View File

@@ -350,9 +350,9 @@ app.post("/public/assignment/respond", async (req, res) => {
await client.query('BEGIN');
const q = await client.query(
"SELECT * FROM assignment_pings WHERE token = $1 AND status = 'pending' AND expires_at > NOW()",
[token]
);
            "SELECT * FROM assignment_pings WHERE token = $1 AND status = 'pending' AND expires_at > $2", 
            [token, new Date()]
        );
if (q.rowCount === 0) throw new Error("Acción caducada");
const ping = q.rows[0];