philomena/lib/philomena_web/router.ex

51 lines
1.2 KiB
Elixir
Raw Normal View History

2019-08-14 20:32:32 -04:00
defmodule PhilomenaWeb.Router do
use PhilomenaWeb, :router
2019-08-17 14:58:36 -04:00
use Pow.Phoenix.Router
2019-08-14 20:32:32 -04:00
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :protect_from_forgery
plug :put_secure_browser_headers
2019-10-06 16:25:40 -04:00
plug PhilomenaWeb.Plugs.ImageFilter
2019-10-08 19:19:57 -04:00
plug PhilomenaWeb.Plugs.Pagination
2019-08-14 20:32:32 -04:00
end
pipeline :api do
plug :accepts, ["json"]
end
2019-10-31 13:57:39 -04:00
scope "/" do
pipe_through :browser
2019-11-10 18:35:52 -05:00
#pow_routes()
2019-10-31 13:57:39 -04:00
end
2019-08-17 14:58:36 -04:00
2019-08-14 20:32:32 -04:00
scope "/", PhilomenaWeb do
pipe_through :browser
2019-10-04 12:48:00 -04:00
get "/", ActivityController, :index
2019-08-18 12:17:05 -04:00
2019-10-08 19:19:57 -04:00
resources "/activity", ActivityController, only: [:index]
2019-08-18 12:17:05 -04:00
resources "/images", ImageController, only: [:index, :show]
2019-08-18 14:14:36 -04:00
resources "/tags", TagController, only: [:index, :show]
2019-08-28 21:33:58 -04:00
resources "/search", SearchController, only: [:index]
2019-10-06 17:31:48 -04:00
resources "/forums", ForumController, only: [:index, :show] do
resources "/topics", TopicController, only: [:show]
end
2019-08-18 14:14:36 -04:00
2019-10-08 20:45:04 -04:00
scope "/filters", Filter, as: :filter do
resources "/current", CurrentController, only: [:update], singular: true
end
2019-10-09 11:51:14 -04:00
resources "/filters", FilterController
2019-10-08 20:45:04 -04:00
2019-08-18 14:14:36 -04:00
get "/:id", ImageController, :show
2019-08-14 20:32:32 -04:00
end
# Other scopes may use custom stacks.
# scope "/api", PhilomenaWeb do
# pipe_through :api
# end
end