From bf0a48847c9f4ab0de002d28a65968e4c44352a2 Mon Sep 17 00:00:00 2001 From: Samantaz Fox Date: Wed, 5 Jan 2022 19:58:24 +0100 Subject: [PATCH] DB: fix subscription not being cleared Fixes https://github.com/iv-org/invidious/issues/2764 --- src/invidious/database/users.cr | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/invidious/database/users.cr b/src/invidious/database/users.cr index 71650918..53724dbf 100644 --- a/src/invidious/database/users.cr +++ b/src/invidious/database/users.cr @@ -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 # -------------------