Skip to content

Commit 5eedac1

Browse files
adds protected routes
1 parent d0433fa commit 5eedac1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/reddit_web/router.ex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ defmodule RedditWeb.Router do
3232

3333
get "/", PageController, :index
3434
get "/u/:username", UserController, :profile
35-
resources "/communities", CommunityController, except: [:show]
35+
resources "/communities", CommunityController, only: [:index]
3636
get "/r/:name", CommunityController, :show
3737
end
3838

@@ -50,6 +50,7 @@ defmodule RedditWeb.Router do
5050

5151
scope "/", RedditWeb do
5252
pipe_through [:browser, :protected]
53+
resources "/communities", CommunityController, except: [:index, :show]
5354
# Add your protected routes here
5455
end
5556

0 commit comments

Comments
 (0)