Make deleting an actor ignoring error when deleting files

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2021-05-12 18:19:03 +02:00
parent f84cc299ba
commit bfb04bb84d
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
1 changed files with 2 additions and 0 deletions

View File

@ -1343,6 +1343,7 @@ defmodule Mobilizon.Actors do
defp remove_banner(%Actor{banner: %File{url: url}} = actor) do
safe_remove_file(url, actor)
{:ok, actor}
end
@spec remove_avatar(Actor.t()) :: {:ok, Actor.t()}
@ -1350,6 +1351,7 @@ defmodule Mobilizon.Actors do
defp remove_avatar(%Actor{avatar: %File{url: url}} = actor) do
safe_remove_file(url, actor)
{:ok, actor}
end
@spec safe_remove_file(String.t(), Actor.t()) :: {:ok, Actor.t()}