create auto subscription on image upload

This commit is contained in:
byte[] 2019-11-29 00:05:20 -05:00
parent 9db79fe62b
commit 1dab37ed58

View file

@ -69,6 +69,9 @@ defmodule Philomena.Images do
{:ok, count}
end)
|> Multi.run(:subscribe, fn _repo, %{image: image} ->
create_subscription(image, attribution[:user])
end)
|> Multi.run(:after, fn _repo, %{image: image} ->
Processors.after_insert(image)