Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- defmodule MyAppWeb.FooController do
- use MyAppWeb, :controller
- def index01(conn, _params) do
- ~~~
- end
- def index02(conn, _params) do
- ~~~
- end
- end
- defmodule MyAppWeb.BarController do
- use MyAppWeb, :controller
- def index01(conn, _params) do
- ~~~
- end
- def index02(conn, _params) do
- ~~~
- end
- end
- pipeline :browser do
- plug :accepts, ["html"]
- plug :fetch_session
- plug :fetch_flash
- plug :protect_from_forgery
- plug :put_secure_browser_headers
- plug MyAppWeb.CommonLogic, repo: MyAppWeb.Repo
- end
- defmodule MyAppWeb.CommonLogic do
- import Plug.Conn
- def init(opts) do
- IO.puts("init!!")
- opts
- end
- def call(conn, repo) do
- IO.puts("call!!!")
- conn
- end
Add Comment
Please, Sign In to add comment