diff --git a/api/web/controllers/root_controller.ex b/api/web/controllers/root_controller.ex new file mode 100644 index 0000000..135444f --- /dev/null +++ b/api/web/controllers/root_controller.ex @@ -0,0 +1,9 @@ +defmodule Perseids.RootController do + use Perseids.Web, :controller + + def divider(conn, _params) do + conn + |> put_status(204) + |> json("ok") + end +end \ No newline at end of file diff --git a/api/web/router.ex b/api/web/router.ex index 4dbe1ce..36237d3 100644 --- a/api/web/router.ex +++ b/api/web/router.ex @@ -32,6 +32,10 @@ defmodule Perseids.Router do ####################### # Only for logged in "admin" user + scope "/", Perseids do + get "/", RootController, :divider + end + scope "/api/v1", Perseids do pipe_through :api pipe_through :authorized