philomena/lib/philomena_web/controllers/notification_controller.ex

12 lines
340 B
Elixir
Raw Normal View History

2019-11-16 04:50:58 +01:00
defmodule PhilomenaWeb.NotificationController do
use PhilomenaWeb, :controller
alias Philomena.Notifications
2019-11-16 04:50:58 +01:00
def index(conn, _params) do
notifications = Notifications.unread_notifications_for_user(conn.assigns.current_user, 15)
2019-11-16 04:50:58 +01:00
2019-12-16 20:24:38 +01:00
render(conn, "index.html", title: "Notification Area", notifications: notifications)
2019-11-16 04:50:58 +01:00
end
2019-12-16 20:24:38 +01:00
end