philomena/lib/philomena_web/controllers/notification_controller.ex

16 lines
381 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
2024-07-08 00:09:20 +02:00
notifications =
Notifications.unread_notifications_for_user(
conn.assigns.current_user,
page_size: 10
)
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