index.community/backend/lib/backend_web/router.ex
2019-08-27 13:50:16 +00:00

20 lines
533 B
Elixir

defmodule BackendWeb.Router do
use BackendWeb, :router
pipeline :api do
plug(:accepts, ["json"])
end
scope "/api", BackendWeb do
pipe_through(:api)
resources("/instances", InstanceController, only: [:index, :show])
resources("/graph", GraphController, only: [:index, :show])
resources("/search", SearchController, only: [:index])
resources("/admin/login", AdminLoginController, only: [:show, :create])
get "/admin", AdminController, :show
post "/admin", AdminController, :update
end
end