DB: fix subscription not being cleared

Fixes https://github.com/iv-org/invidious/issues/2764
pull/2767/head
Samantaz Fox 3 years ago
parent 3bb7fbb2f1
commit bf0a48847c
No known key found for this signature in database
GPG Key ID: F42821059186176E

@ -143,11 +143,11 @@ module Invidious::Database::Users
def clear_notifications(user : User)
request = <<-SQL
UPDATE users
SET notifications = $1, updated = $2
WHERE email = $3
SET notifications = '{}', updated = $1
WHERE email = $2
SQL
PG_DB.exec(request, [] of String, Time.utc, user)
PG_DB.exec(request, Time.utc, user.email)
end
# -------------------

Loading…
Cancel
Save