16 lines
391 B
Elixir
16 lines
391 B
Elixir
defmodule OutlookWeb.ArtikelController do
|
|
use OutlookWeb, :controller
|
|
|
|
alias Outlook.Artikel
|
|
|
|
def index(conn, _params) do
|
|
artikel = Artikel.list_artikel()
|
|
render(conn, :index, artikel: artikel, page_title: "Artikel")
|
|
end
|
|
|
|
def show(conn, %{"id" => id}) do
|
|
artikel = Artikel.get_artikel!(id)
|
|
render(conn, :show, artikel: artikel, page_title: artikel.title)
|
|
end
|
|
end
|