Refactor Autoren context into Public context
This commit is contained in:
@ -61,4 +61,15 @@ implement to_param protocol (no more needed for Outlook.Translations.Translation
|
||||
|> String.to_integer(36)
|
||||
|> get_artikel!()
|
||||
end
|
||||
|
||||
# for /autoren/
|
||||
|
||||
def list_autoren do
|
||||
Repo.all(Author)
|
||||
end
|
||||
|
||||
def get_autor!(id) do
|
||||
Repo.get!(Author, id)
|
||||
|> Repo.preload([articles: [:translations]])
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user