Invidious is an alternative front-end to YouTube
Fix /clear_watch_history
Omar Rotha1ad561b9801
diff --git a/src/invidious.cr b/src/invidious.crindex d2b37705..41c1db9c 100644--- a/src/invidious.cr+++ b/src/invidious.cr@@ -1201,8 +1201,9 @@ get "/clear_watch_history" do |env|if useruser = user.as(User)+ sid = env.get("sid").as(String)- PG_DB.exec("UPDATE users SET watched = '{}' WHERE id = $1", user.id)+ PG_DB.exec("UPDATE users SET watched = '{}' WHERE $1 = ANY(id)", sid)endenv.redirect referer