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

19 lines
437 B
Elixir
Raw Normal View History

2019-12-05 05:12:49 +01:00
defmodule PhilomenaWeb.Gallery.ReadController do
import Plug.Conn
use PhilomenaWeb, :controller
alias Philomena.Galleries.Gallery
alias Philomena.Galleries
plug :load_resource, model: Gallery, id_name: "gallery_id", persisted: true
def create(conn, _params) do
gallery = conn.assigns.gallery
user = conn.assigns.current_user
Galleries.clear_notification(gallery, user)
send_resp(conn, :ok, "")
end
2020-01-11 05:20:19 +01:00
end