mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-03-01 16:44:32 +01:00
Broadcast batch tag updates to firehose
This commit is contained in:
parent
243de283da
commit
ee3da86230
1 changed files with 10 additions and 0 deletions
|
@ -44,6 +44,16 @@ defmodule PhilomenaWeb.Admin.Batch.TagController do
|
||||||
|
|
||||||
case Images.batch_update(image_ids, added_tags, removed_tags, attributes) do
|
case Images.batch_update(image_ids, added_tags, removed_tags, attributes) do
|
||||||
{:ok, _} ->
|
{:ok, _} ->
|
||||||
|
PhilomenaWeb.Endpoint.broadcast!(
|
||||||
|
"firehose",
|
||||||
|
"image:batch_tag_update",
|
||||||
|
%{
|
||||||
|
image_ids: image_ids,
|
||||||
|
added: Enum.map(added_tags, & &1.name),
|
||||||
|
removed: Enum.map(removed_tags, & &1.name)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
conn
|
conn
|
||||||
|> moderation_log(
|
|> moderation_log(
|
||||||
details: &log_details/2,
|
details: &log_details/2,
|
||||||
|
|
Loading…
Reference in a new issue