mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2023-06-08.git
synced 2024-08-15 00:53:38 +00:00
Use single db call
This commit is contained in:
parent
20289a4d01
commit
025e755542
1 changed files with 1 additions and 2 deletions
|
@ -50,10 +50,9 @@ module Invidious::Database::Users
|
|||
end
|
||||
|
||||
def mark_watched(user : User, vid : String)
|
||||
mark_unwatched(user, vid)
|
||||
request = <<-SQL
|
||||
UPDATE users
|
||||
SET watched = array_append(watched, $1)
|
||||
SET watched = array_append(array_remove(watched, $1), $1)
|
||||
WHERE email = $2
|
||||
SQL
|
||||
|
||||
|
|
Loading…
Reference in a new issue