Merge pull request #433 from mdashlw/firehose-batch-update

Broadcast batch tag updates to firehose
This commit is contained in:
liamwhite 2025-02-28 12:12:36 -05:00 committed by GitHub
commit ce23797473
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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,