diff --git a/lib/inmana_web/controllers/supplies_controller.ex b/lib/inmana_web/controllers/supplies_controller.ex index 3ebd76a..8eee7dd 100644 --- a/lib/inmana_web/controllers/supplies_controller.ex +++ b/lib/inmana_web/controllers/supplies_controller.ex @@ -14,4 +14,12 @@ defmodule InmanaWeb.SuppliesController do |> render("create.json", supply: supply) end end + + def show(connection, %{"id" => uuid}) do + with {:ok, %Supply{} = supply} <- Inmana.get_supply(uuid) do + connection + |> put_status(:ok) + |> render("show.json", supply: supply) + end + end end