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,15 @@
defmodule OutlookWeb.ArtikelController do
use OutlookWeb, :controller
alias Outlook.Artikel
def index(conn, _params) do
artikel = Artikel.list_artikel()
render(conn, :index, artikel: artikel)
end
def show(conn, %{"id" => id}) do
artikel = Artikel.get_artikel!(id)
render(conn, :show, artikel: artikel)
end
end