mirror of
https://github.com/mgerb/classic-wow-forums
synced 2026-03-05 23:35:25 +00:00
init
This commit is contained in:
10
lib/myapp/auth/handler.ex
Normal file
10
lib/myapp/auth/handler.ex
Normal file
@@ -0,0 +1,10 @@
|
||||
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
|
||||
Reference in New Issue
Block a user