This commit is contained in:
Omer Sabic 2024-06-13 14:54:39 +02:00
parent e6a8ef5f9e
commit dfe23fffcc

View File

@ -376,7 +376,7 @@ export const dashboardRoutes = (fastify, _, done) => {
form.set("hub.callback", env.PUBLIC_API_URL + "/webhooks/youtube"); form.set("hub.callback", env.PUBLIC_API_URL + "/webhooks/youtube");
form.set("hub.topic", "https://www.youtube.com/xml/feeds/videos.xml?channel_id=" + user.channel_id); form.set("hub.topic", "https://www.youtube.com/xml/feeds/videos.xml?channel_id=" + user.channel_id);
form.set("hub.verify", "async"); form.set("hub.verify", "async");
form.set("hub.mode", auto_publish ? "subscribe" : "unsubscribe"); form.set("hub.mode", req.body.auto_publish ? "subscribe" : "unsubscribe");
form.set("hub.verify_token", websubVerifyToken); form.set("hub.verify_token", websubVerifyToken);
await fetch("https://pubsubhubbub.appspot.com/subscribe", { await fetch("https://pubsubhubbub.appspot.com/subscribe", {
method: "POST", method: "POST",