fixes #114, channel visibility routing error

This commit is contained in:
byte[] 2020-05-04 22:34:10 -04:00
parent 6bbe358dd1
commit 6f9955bac1

View file

@ -145,6 +145,15 @@ defmodule PhilomenaWeb.Router do
end
end
scope "/", PhilomenaWeb do
pipe_through [:browser, :ensure_totp, :ensure_tor_authorized]
# A curiosity due to the fact that Phoenix routes cannot have constraints
scope "/channels", Channel, as: :channel do
resources "/nsfw", NsfwController, only: [:create, :delete], singleton: true
end
end
scope "/", PhilomenaWeb do
pipe_through [:browser, :ensure_totp, :protected]
@ -488,10 +497,6 @@ defmodule PhilomenaWeb.Router do
resources "/history", Page.HistoryController, only: [:index]
end
scope "/channels", Channel, as: :channel do
resources "/nsfw", NsfwController, only: [:create, :delete], singleton: true
end
resources "/dnp", DnpEntryController, only: [:index, :show]
resources "/staff", StaffController, only: [:index]
resources "/stats", StatController, only: [:index]