Drop REST API boilerplate for now

This commit is contained in:
Andrew Dryga
2023-04-04 11:50:07 -06:00
parent 9ffb741e96
commit d4e4d702ab
3 changed files with 0 additions and 39 deletions

View File

@@ -1,15 +0,0 @@
defmodule API.ErrorJSON do
# If you want to customize a particular status code,
# you may add your own clauses, such as:
#
# def render("500.json", _assigns) do
# %{errors: %{detail: "Internal Server Error"}}
# end
# By default, Phoenix returns the status message from
# the template name. For example, "404.json" becomes
# "Not Found".
def render(template, _assigns) do
%{errors: %{detail: Phoenix.Controller.status_message_from_template(template)}}
end
end

View File

@@ -22,17 +22,4 @@ defmodule API.Endpoint do
websocket: true,
longpoll: false,
connect_info: [:user_agent, :peer_data, :x_headers]
# plug Plug.Parsers,
# parsers: [:urlencoded, :multipart, :json],
# pass: ["*/*"],
# json_decoder: Phoenix.json_library()
# plug Plug.MethodOverride
# plug Plug.Head
# # TODO: probably we don't need a session here at all
# plug Plug.Session, API.Session.options()
# plug API.Router
end

View File

@@ -1,11 +0,0 @@
defmodule API.Router do
use API, :router
pipeline :api do
plug :accepts, ["json"]
end
scope "/client", API.Client do
pipe_through :api
end
end