Changed fallback controller to handle all cases from OAuthController

This commit is contained in:
Calv Collins 2018-02-08 18:15:59 +00:00
parent 314f4775c5
commit 73249fa5ff
1 changed files with 2 additions and 9 deletions

View File

@ -2,15 +2,8 @@ defmodule Pleroma.Web.OAuth.FallbackController do
use Pleroma.Web, :controller use Pleroma.Web, :controller
alias Pleroma.Web.OAuth.OAuthController alias Pleroma.Web.OAuth.OAuthController
# No user # No user/password
def call(conn, nil) do def call(conn, _) do
conn
|> put_flash(:error, "Invalid Username/Password")
|> OAuthController.authorize(conn.params)
end
# No password
def call(conn, false) do
conn conn
|> put_flash(:error, "Invalid Username/Password") |> put_flash(:error, "Invalid Username/Password")
|> OAuthController.authorize(conn.params) |> OAuthController.authorize(conn.params)