mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-03-16.git
synced 2024-08-15 00:53:18 +00:00
Fix /clear_watch_history
This commit is contained in:
parent
7fd0f93d02
commit
a1ad561b98
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue