Files
phoenix-ausblick/lib/outlook_web/controllers/artikel_controller.ex
2023-01-19 11:25:14 +01:00

16 lines
341 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)
end
def show(conn, %{"id" => id}) do
artikel = Artikel.get_artikel!(id)
render(conn, :show, artikel: artikel)
end
end