Changed fallback controller to handle all cases from OAuthController
This commit is contained in:
parent
314f4775c5
commit
73249fa5ff
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue