mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
Reorganizing page
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
defmodule CfHttpWeb.PageController do
|
||||
use CfHttpWeb, :controller
|
||||
|
||||
def index(conn, _params) do
|
||||
render(conn, "index.html")
|
||||
end
|
||||
end
|
||||
@@ -4,7 +4,7 @@ defmodule CfHttpWeb.UserController do
|
||||
"""
|
||||
|
||||
use CfHttpWeb, :controller
|
||||
alias CfHttp.{Repo, User}
|
||||
alias CfHttp.{Repo, Users.User}
|
||||
|
||||
plug CfHttpWeb.Plugs.Authenticator when action in [:show, :edit, :update, :delete]
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ defmodule CfHttpWeb.Plugs.Authenticator do
|
||||
"""
|
||||
|
||||
import Plug.Conn
|
||||
alias CfHttp.User
|
||||
alias CfHttp.Users.User
|
||||
|
||||
def init(default), do: default
|
||||
|
||||
|
||||
@@ -16,8 +16,6 @@ defmodule CfHttpWeb.Router do
|
||||
scope "/", CfHttpWeb do
|
||||
pipe_through :browser
|
||||
|
||||
get "/", PageController, :index
|
||||
|
||||
resources "/user", UserController, singleton: true, only: [:show, :edit, :update, :delete]
|
||||
resources "/users", UserController, only: [:new, :create]
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
Welcome!
|
||||
@@ -1,3 +0,0 @@
|
||||
defmodule CfHttpWeb.PageView do
|
||||
use CfHttpWeb, :view
|
||||
end
|
||||
@@ -1,8 +0,0 @@
|
||||
defmodule CfHttpWeb.PageControllerTest do
|
||||
use CfHttpWeb.ConnCase
|
||||
|
||||
test "GET /", %{conn: conn} do
|
||||
conn = get(conn, "/")
|
||||
assert html_response(conn, 200) =~ "Welcome!"
|
||||
end
|
||||
end
|
||||
@@ -1,3 +0,0 @@
|
||||
defmodule CfHttpWeb.PageViewTest do
|
||||
use CfHttpWeb.ConnCase, async: true
|
||||
end
|
||||
Reference in New Issue
Block a user