Skip to content

Commit 47b85a5

Browse files
committed
fix(elixir:gsmlg): Removee debug output and format code.
1 parent 63d4140 commit 47b85a5

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

elixir/gsmlg_umbrella/apps/gsmlg_web/lib/gsmlg_web/controllers/fallback_controller.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ defmodule GSMLGWeb.FallbackController do
99
# This clause is an example of how to handle resources that cannot be found.
1010
def call(conn, {:error, :not_found}) do
1111
conn
12-
|> put_status(:not_found)
13-
|> put_view(GSMLGWeb.ErrorView)
14-
|> render(:"404")
12+
|> put_status(:not_found)
13+
|> put_view(GSMLGWeb.ErrorView)
14+
|> render(:"404")
1515
end
1616
end

elixir/gsmlg_umbrella/apps/gsmlg_web/lib/gsmlg_web/controllers/node_management_controller.ex

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,17 @@ defmodule GSMLGWeb.NodeManagementController do
66
render(conn, "index.html", nodes: nodes)
77
end
88

9-
def update(conn, %{ "action" => "set-node-cookie", "cookie" => cookie } = _params) do
9+
def update(conn, %{"action" => "set-node-cookie", "cookie" => cookie} = _params) do
1010
case cookie |> String.to_atom() |> Node.set_cookie() do
1111
true ->
1212
send_resp(conn, :created, ~s({"cookie": "#{cookie}"}))
13+
1314
error ->
14-
IO.inspect error
15+
IO.inspect(error)
1516
send_resp(conn, :forbidden, ~s({"error": "error"}))
1617
end
1718
end
19+
1820
def update(conn, _params) do
1921
send_resp(conn, :no_content, "")
2022
end

elixir/gsmlg_umbrella/apps/gsmlg_web/lib/gsmlg_web/controllers/page_controller.ex

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ defmodule GSMLGWeb.PageController do
66
end
77

88
def not_found(conn, _params) do
9-
IO.inspect(conn)
10-
119
case handle_path(conn.request_path) do
1210
{:html, file} ->
1311
conn
@@ -28,14 +26,15 @@ defmodule GSMLGWeb.PageController do
2826
end
2927

3028
defp handle_path(path) do
31-
IO.puts(path)
3229
path = if path == "/", do: "/index", else: path
3330

3431
cond do
3532
File.exists?(file_path = Path.join(:code.priv_dir(:gsmlg_web), "static" <> path <> ".html")) ->
3633
{:html, file_path}
37-
38-
File.exists?(file_path = Path.join(:code.priv_dir(:gsmlg_web), "static" <> path <> "/index.html")) ->
34+
35+
File.exists?(
36+
file_path = Path.join(:code.priv_dir(:gsmlg_web), "static" <> path <> "/index.html")
37+
) ->
3938
{:html, file_path}
4039

4140
File.exists?(file_path = Path.join(:code.priv_dir(:gsmlg_web), "static/404.html")) ->

0 commit comments

Comments
 (0)