Track usage of media files and add a job to clean them
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -103,7 +103,7 @@ defmodule Mobilizon.Posts do
|
||||
@spec update_post(Post.t(), map) :: {:ok, Post.t()} | {:error, Ecto.Changeset.t()}
|
||||
def update_post(%Post{} = post, attrs) do
|
||||
post
|
||||
|> Repo.preload(:tags)
|
||||
|> Repo.preload([:tags, :media])
|
||||
|> Post.changeset(attrs)
|
||||
|> Repo.update()
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user