From 84a967375912bdb92fc1e5ea8598a49d7c94c537 Mon Sep 17 00:00:00 2001 From: Omer Sabic Date: Thu, 13 Jun 2024 12:14:29 +0200 Subject: [PATCH] fixed verification --- src/routes/webhook.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/webhook.js b/src/routes/webhook.js index b7f92d4..1e15b6e 100644 --- a/src/routes/webhook.js +++ b/src/routes/webhook.js @@ -27,9 +27,9 @@ export const webhookRoutes = (fastify, _, done) => { fastify.get("/youtube", async (req, reply) => { // Check if the request contains the 'hub.challenge' query parameter - if (req.query.hub.challenge) { + if (req.query["hub.challenge"]) { // Respond with the challenge to verify the subscription - return reply.send(req.query.hub.challenge); + return reply.send(req.query["hub.challenge"]); } else { // Handle other cases or errors return reply.code(404).send("Not found");