mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-23 20:18:00 +01:00
18 lines
420 B
Elixir
18 lines
420 B
Elixir
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
|
|
|
|
Images.clear_image_notification(image, user)
|
|
|
|
send_resp(conn, :ok, "")
|
|
end
|
|
end
|