Add autoren and artikel for public viewing

This commit is contained in:
Thelonius Kort
2023-01-19 11:25:14 +01:00
parent aab04f5ecc
commit a93afea57b
12 changed files with 175 additions and 2 deletions

View File

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