1
0
mirror of https://github.com/mgerb/classic-wow-forums synced 2026-01-10 09:02:50 +00:00
Files
classic-wow-forums/lib/myapp/auth/handler.ex
2017-12-31 20:19:44 -06:00

11 lines
213 B
Elixir

defmodule MyApp.Auth.ErrorHandler do
import Plug.Conn
alias MyAppWeb.Response
def auth_error(conn, {type, _reason}, _opts) do
conn
|> put_status(401)
|> Response.json(to_string(type))
end
end