philomena/lib/philomena_web/controllers/forum/read_controller.ex

23 lines
454 B
Elixir
Raw Permalink Normal View History

defmodule PhilomenaWeb.Forum.ReadController do
import Plug.Conn
use PhilomenaWeb, :controller
alias Philomena.Forums.Forum
alias Philomena.Forums
2020-03-03 19:54:47 +01:00
plug :load_resource,
2020-01-11 05:20:19 +01:00
model: Forum,
id_name: "forum_id",
id_field: "short_name",
persisted: true
def create(conn, _params) do
forum = conn.assigns.forum
user = conn.assigns.current_user
Forums.clear_notification(forum, user)
send_resp(conn, :ok, "")
end
2020-01-11 05:20:19 +01:00
end