philomena/lib/philomena_web/controllers/notification_controller.ex

16 lines
381 B
Elixir
Raw Normal View History

2019-11-15 22:50:58 -05:00
defmodule PhilomenaWeb.NotificationController do
use PhilomenaWeb, :controller
alias Philomena.Notifications
2019-11-15 22:50:58 -05:00
def index(conn, _params) do
2024-07-07 18:09:20 -04:00
notifications =
Notifications.unread_notifications_for_user(
conn.assigns.current_user,
page_size: 10
)
2019-11-15 22:50:58 -05:00
2019-12-16 14:24:38 -05:00
render(conn, "index.html", title: "Notification Area", notifications: notifications)
2019-11-15 22:50:58 -05:00
end
2019-12-16 14:24:38 -05:00
end