Properly clear notifications when viewing feed

pull/38/head
Omar Roth 7 years ago
parent 09cd7bcc66
commit 0b0e56504a

@ -1193,7 +1193,8 @@ get "/feed/subscriptions" do |env|
end end
PG_DB.exec("UPDATE users SET notifications = $1 WHERE id = $2", [] of String, user.id) PG_DB.exec("UPDATE users SET notifications = $1 WHERE id = $2", [] of String, user.id)
env.set "notifications", 0 user.notifications = [] of String
env.set "user", user
templated "subscriptions" templated "subscriptions"
else else

Loading…
Cancel
Save