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

19 lines
442 B
Elixir
Raw Normal View History

2019-12-05 05:27:40 +01:00
defmodule PhilomenaWeb.Channel.ReadController do
import Plug.Conn
use PhilomenaWeb, :controller
alias Philomena.Channels.Channel
alias Philomena.Channels
plug :load_resource, model: Channel, id_name: "channel_id", persisted: true
def create(conn, _params) do
channel = conn.assigns.channel
user = conn.assigns.current_user
2024-07-08 00:09:20 +02:00
Channels.clear_channel_notification(channel, user)
2019-12-05 05:27:40 +01:00
send_resp(conn, :ok, "")
end
2020-01-11 05:20:19 +01:00
end