Using "item" instead of "data" as name for the JSON object when rendering a single item.

This commit is contained in:
2026-02-02 16:53:08 +01:00
parent e1fd1fb257
commit 9103a29a71

View File

@ -12,7 +12,7 @@ defmodule GenericRestServerWeb.ItemJSON do
Renders a single item.
"""
def show(%{item: item}) do
%{data: data(item)}
%{item: data(item)}
end
defp data(%Item{} = item) do