Add listing translation with article

This commit is contained in:
Thelonius Kort
2023-01-14 21:51:04 +01:00
parent b7db9cdd8e
commit 3b1c1d04a1
3 changed files with 32 additions and 4 deletions

View File

@ -40,6 +40,12 @@ defmodule Outlook.Articles do
|> Repo.preload([:author])
end
def get_article_with_translations!(id) do
Repo.get!(Article, id)
|> Repo.preload([:author])
|> Repo.preload([:translations])
end
@doc """
Creates a article.