Limit number of error messages

This commit is contained in:
Chris McCord 2021-11-10 15:07:46 -05:00
parent 0f384a3cb8
commit d9b5a61702

View file

@ -195,7 +195,7 @@ defmodule LiveBeatsWeb.SongLive.UploadFormComponent do
socket socket
|> cancel_upload(:mp3, entry.ref) |> cancel_upload(:mp3, entry.ref)
|> drop_changeset(entry.ref) |> drop_changeset(entry.ref)
|> update(:error_messages, &(&1 ++ [{entry.client_name, reason}])) |> update(:error_messages, &(Enum.take(&1 ++ [{entry.client_name, reason}], -10)))
end end
defp get_entry!(socket, entry_ref) do defp get_entry!(socket, entry_ref) do