fixed verification
This commit is contained in:
parent
5208119964
commit
84a9673759
@ -27,9 +27,9 @@ export const webhookRoutes = (fastify, _, done) => {
|
|||||||
|
|
||||||
fastify.get("/youtube", async (req, reply) => {
|
fastify.get("/youtube", async (req, reply) => {
|
||||||
// Check if the request contains the 'hub.challenge' query parameter
|
// 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
|
// Respond with the challenge to verify the subscription
|
||||||
return reply.send(req.query.hub.challenge);
|
return reply.send(req.query["hub.challenge"]);
|
||||||
} else {
|
} else {
|
||||||
// Handle other cases or errors
|
// Handle other cases or errors
|
||||||
return reply.code(404).send("Not found");
|
return reply.code(404).send("Not found");
|
||||||
|
Loading…
Reference in New Issue
Block a user