Changed fallback controller to handle all cases from OAuthController
authorCalv Collins <calvcoll@gmail.com>
Thu, 8 Feb 2018 18:15:59 +0000 (18:15 +0000)
committerCalv Collins <calvcoll@gmail.com>
Thu, 8 Feb 2018 18:15:59 +0000 (18:15 +0000)
lib/pleroma/web/oauth/fallback_controller.ex

index 9ba9bc289f8d3d37c03eb732b1d4778e48ee9bc5..daa11053243ba5da3b05fdd186348d7f7b460106 100644 (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)