Add autoren and artikel for public viewing
This commit is contained in:
15
lib/outlook_web/controllers/artikel_controller.ex
Normal file
15
lib/outlook_web/controllers/artikel_controller.ex
Normal 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
|
||||
Reference in New Issue
Block a user