1
0
Fork 1
mirror of https://akkoma.dev/AkkomaGang/akkoma.git synced 2024-11-19 11:29:17 +00:00

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)