mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-12-17 22:47:59 +01:00
22 lines
454 B
Elixir
22 lines
454 B
Elixir
defmodule PhilomenaWeb.Forum.ReadController do
|
|
import Plug.Conn
|
|
use PhilomenaWeb, :controller
|
|
|
|
alias Philomena.Forums.Forum
|
|
alias Philomena.Forums
|
|
|
|
plug :load_resource,
|
|
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
|
|
end
|