summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOmar Roth <omarroth@hotmail.com>2018-04-05 20:07:14 -0500
committerOmar Roth <omarroth@hotmail.com>2018-04-05 20:07:14 -0500
commitff91ec820c91feb9135e10e2cf3f8b2acf33c8cc (patch)
tree014e99ccb4da6d9734ef7686e02945b0f15b16ef
parentcc6d322b0c6ac86ac83216c7475aab90f090b57d (diff)
downloadinvidious-ff91ec820c91feb9135e10e2cf3f8b2acf33c8cc.tar.gz
invidious-ff91ec820c91feb9135e10e2cf3f8b2acf33c8cc.tar.bz2
invidious-ff91ec820c91feb9135e10e2cf3f8b2acf33c8cc.zip
Remove notifications once viewed
-rw-r--r--src/invidious.cr1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/invidious.cr b/src/invidious.cr
index 7307b255..461f3128 100644
--- a/src/invidious.cr
+++ b/src/invidious.cr
@@ -594,6 +594,7 @@ get "/feed/subscriptions" do |env|
videos = PG_DB.query_all("SELECT * FROM channel_videos WHERE ucid IN (#{args}) \
ORDER BY published DESC LIMIT $1 OFFSET $2", [max_results, offset] + user.subscriptions, as: ChannelVideo)
+ PG_DB.exec("UPDATE users SET notifications = $1 WHERE id = $2", [] of String, sid)
env.set "notifications", 0
templated "subscriptions"