Files
phoenix-ausblick/lib/outlook_web/controllers/autor_controller.ex
2023-01-19 22:17:26 +01:00

17 lines
422 B
Elixir

defmodule OutlookWeb.AutorController do
use OutlookWeb, :controller
alias Outlook.Autoren
def index(conn, _params) do
autoren = Autoren.list_autoren()
render(conn, :index, autoren: autoren, page_title: "Autoren")
end
def show(conn, %{"id" => id}) do
autor = Autoren.get_autor!(id)
# artikel = Autoren.list_artikel(autor)
render(conn, :show, autor: autor, page_title: autor.name)
end
end