4 ms·
Correct. You write a moduleJSON. So this is about what we have for one of our controller/views: defmodule MyWeb.SystemStateJSON do def index(%{summary: s
by eclark 4y ago
Correct. You write a moduleJSON. So this is about what we have for one of our controller/views:
defmodule MyWeb.SystemStateJSON do
def index(%{summary: summary}) do
%{data: summary}
end
end