Current section

Files

Jump to
openmaize priv templates phoenix phx_api auth_view.ex
Raw

priv/templates/phoenix/phx_api/auth_view.ex

defmodule <%= base %>.AuthView do
use <%= base %>.Web, :view
def render("401.json", _assigns) do
%{errors: %{detail: "You need to login to view this resource"}}
end
def render("403.json", _assigns) do
%{errors: %{detail: "You are not authorized to view this resource"}}
end
end