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

19 lines
420 B
Elixir
Raw Normal View History

defmodule PhilomenaWeb.Image.ReadController do
import Plug.Conn
use PhilomenaWeb, :controller
alias Philomena.Images.Image
alias Philomena.Images
plug :load_resource, model: Image, id_name: "image_id", persisted: true
def create(conn, _params) do
image = conn.assigns.image
user = conn.assigns.current_user
2024-07-08 00:09:20 +02:00
Images.clear_image_notification(image, user)
send_resp(conn, :ok, "")
end
2020-01-11 05:20:19 +01:00
end