From 128aae05f374b7212e7676844520a4ddbbf8a94e Mon Sep 17 00:00:00 2001 From: Ivan Tashkinov Date: Wed, 17 Apr 2019 11:33:21 +0300 Subject: [PATCH] [#923] Minor semantic adjustment. --- lib/pleroma/web/oauth/oauth_controller.ex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/pleroma/web/oauth/oauth_controller.ex b/lib/pleroma/web/oauth/oauth_controller.ex index 8e5a83466..9874bac23 100644 --- a/lib/pleroma/web/oauth/oauth_controller.ex +++ b/lib/pleroma/web/oauth/oauth_controller.ex @@ -44,7 +44,9 @@ def authorize(%{assigns: %{token: %Token{} = token}} = conn, params) do def authorize(conn, params), do: do_authorize(conn, params) - defp do_authorize(conn, %{"authorization" => auth_attrs}) do + defp do_authorize(conn, %{"authorization" => auth_attrs}), do: do_authorize(conn, auth_attrs) + + defp do_authorize(conn, auth_attrs) do app = Repo.get_by(App, client_id: auth_attrs["client_id"]) available_scopes = (app && app.scopes) || [] scopes = oauth_scopes(auth_attrs, nil) || available_scopes @@ -60,8 +62,6 @@ defp do_authorize(conn, %{"authorization" => auth_attrs}) do }) end - defp do_authorize(conn, auth_attrs), do: do_authorize(conn, %{"authorization" => auth_attrs}) - def create_authorization( conn, %{"authorization" => _} = params,