diff --git a/server.js b/server.js index e907631..3dba1b3 100644 --- a/server.js +++ b/server.js @@ -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];