defmodule VtexWsWeb.Router do @moduledoc false alias VtexWs.Authorization use VtexWsWeb, :router pipeline :browser do plug :accepts, ["html"] plug :fetch_session plug :fetch_flash plug :protect_from_forgery plug :put_secure_browser_headers end pipeline :api do plug :accepts, ["json"] end pipeline :vtex do plug Authorization.Vtex plug :accepts, ["json"] end scope "/", VtexWsWeb do pipe_through :browser get "/", AppController, :index resources "/apps", AppController end scope "/api", VtexWsWeb do pipe_through :api end scope "/vtex", VtexWsWeb do pipe_through :vtex post "/:app_slug/notification", NotificationController, :notification end pipeline :exq do plug :accepts, ["html"] plug :fetch_session plug :fetch_flash plug :put_secure_browser_headers plug Authorization.Admin plug ExqUi.RouterPlug, namespace: "exq" end scope "/exq", ExqUi do pipe_through :exq forward "/", RouterPlug.Router, :index end end