Skip to content

Commit 3b11a66

Browse files
ConnorRigbyfhunleth
authored andcommitted
re-format router.ex and api.ex
Signed-off-by: Connor Rigby <connorr@hey.com>
1 parent 7a68493 commit 3b11a66

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

.formatter.exs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@
55
"{config,lib,test}/**/*.{ex,exs}",
66
"example/mix.exs",
77
"example/{config,lib,test}/**/*.{ex,exs}"
8-
]
8+
],
9+
import_deps: [:plug]
910
]

lib/vintage_net_wizard/web/api.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ defmodule VintageNetWizard.Web.Api do
88
alias VintageNetWizard.Web.Endpoint
99
alias VintageNetWizard.WiFiConfiguration
1010

11-
plug(Plug.Parsers, parsers: [:json], json_decoder: Jason)
12-
plug(:match)
13-
plug(:dispatch)
11+
plug Plug.Parsers, parsers: [:json], json_decoder: Jason
12+
plug :match
13+
plug :dispatch
1414

1515
get "/configuration/status" do
1616
with status <- BackendServer.configuration_status(),

lib/vintage_net_wizard/web/router.ex

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ defmodule VintageNetWizard.Web.Router do
1010
WiFiConfiguration
1111
}
1212

13-
plug(Plug.Logger, log: :debug)
14-
plug(Plug.Static, from: {:vintage_net_wizard, "priv/static"}, at: "/")
15-
plug(Plug.Parsers, parsers: [Plug.Parsers.URLENCODED, :json], json_decoder: Jason)
13+
plug Plug.Logger, log: :debug
14+
plug Plug.Static, from: {:vintage_net_wizard, "priv/static"}, at: "/"
15+
plug Plug.Parsers, parsers: [Plug.Parsers.URLENCODED, :json], json_decoder: Jason
1616
# This route is polled by the front end to update its list of access points.
1717
# This can mean the user could potentially have the page open without knowing
1818
# it just polling this endpoint but still be inactive.
19-
plug(VintageNetWizard.Plugs.Activity, excluding: ["/api/v1/access_points"])
20-
plug(:match)
21-
plug(:dispatch)
19+
plug VintageNetWizard.Plugs.Activity, excluding: ["/api/v1/access_points"]
20+
plug :match
21+
plug :dispatch
2222

2323
get "/" do
2424
case BackendServer.configurations() do

0 commit comments

Comments
 (0)