defmodule Router do
use Plug.Router
import Abort
plug Abort.Plug, :text
plug :match
plug :dispatch
get "/" do
abort! 401, unless: authorized(conn)
...
end
end
interline / plug_abort Goto Github PK
View Code? Open in Web Editor NEWabort! status [message][, unless: expression]
License: MIT License