Add the authentication for API sing in.
This commit is contained in:
@@ -21,4 +21,10 @@ defmodule LinkShortenerWeb.FallbackController do
|
||||
|> put_view(LinkShortenerWeb.ErrorView)
|
||||
|> render(:"404")
|
||||
end
|
||||
|
||||
def call(conn, {:error, :unauthorized}) do
|
||||
conn
|
||||
|> put_status(:unauthorized)
|
||||
|> render(LinkShortenerWeb.ErrorView, :"401")
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user