Fix /clear_watch_history

pull/143/head
Omar Roth 2018-08-25 21:33:33 -05:00
rodzic 7fd0f93d02
commit a1ad561b98
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -1201,8 +1201,9 @@ get "/clear_watch_history" do |env|
if user
user = 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)
end
env.redirect referer