fix epoch
This commit is contained in:
parent
7d5326af79
commit
e8325bce03
@ -34,7 +34,7 @@ export const webhookRoutes = (fastify, _, done) => {
|
|||||||
const [user] = await db.select().from(users).where(eq(users.channel_id, channel));
|
const [user] = await db.select().from(users).where(eq(users.channel_id, channel));
|
||||||
if(!user) return reply.code(400).send("Invalid user");
|
if(!user) return reply.code(400).send("Invalid user");
|
||||||
await db.update(sites).set({
|
await db.update(sites).set({
|
||||||
pubsub_expiry: new Date(new Date().getTime() + parseInt(req.query["hub.lease_seconds"] || 172800))
|
pubsub_expiry: new Date(new Date().getTime() + parseInt(req.query["hub.lease_seconds"] || 172800 * 1000))
|
||||||
}).where(eq(sites.user_id, user.id));
|
}).where(eq(sites.user_id, user.id));
|
||||||
// Respond with the challenge to verify the subscription
|
// Respond with the challenge to verify the subscription
|
||||||
console.log(req.query)
|
console.log(req.query)
|
||||||
|
Loading…
Reference in New Issue
Block a user