From b3788bc1431aea47b7a9ffb325984f4a58c21125 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Sat, 1 Jun 2019 11:19:01 -0500 Subject: [PATCH] Fix typo for feed_needs_update --- src/invidious.cr | 2 +- src/invidious/channels.cr | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/invidious.cr b/src/invidious.cr index 822f7b85..86df1775 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -2881,7 +2881,7 @@ post "/feed/webhook/:token" do |env| values = "VALUES #{emails.map { |id| %(('#{id}')) }.join(",")}" end - PG_DB.exec("UPDATE users SET feed_needs_update = true WHERE email = ANY($1)", emails) + PG_DB.exec("UPDATE users SET feed_needs_update = true WHERE email = ANY(#{values})") end end diff --git a/src/invidious/channels.cr b/src/invidious/channels.cr index d33cd9c3..0f760dad 100644 --- a/src/invidious/channels.cr +++ b/src/invidious/channels.cr @@ -205,7 +205,7 @@ def fetch_channel(ucid, db, pull_all_videos = true, locale = nil) values = "VALUES #{emails.map { |id| %(('#{id}')) }.join(",")}" end - db.exec("UPDATE users SET feed_needs_update = true WHERE email = ANY($1)", emails) + db.exec("UPDATE users SET feed_needs_update = true WHERE email = ANY(#{values})") end if pull_all_videos @@ -273,7 +273,7 @@ def fetch_channel(ucid, db, pull_all_videos = true, locale = nil) values = "VALUES #{emails.map { |id| %(('#{id}')) }.join(",")}" end - db.exec("UPDATE users SET feed_needs_update = true WHERE email = ANY($1)", emails) + db.exec("UPDATE users SET feed_needs_update = true WHERE email = ANY(#{values})") end end