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

View file

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