X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Foauth%2Foauth_controller.ex;h=9874bac2319bdc706b9cd6cc348cb0f3243e9af0;hb=218d96a26bf551e0e08c54467975fdc07206084d;hp=8e5a834664eaf917fc2b414edb5826acba411ce2;hpb=c3f12cf3c3597385481290b53a6bce31730a6a29;p=akkoma 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 @@ defmodule Pleroma.Web.OAuth.OAuthController 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 @@ defmodule Pleroma.Web.OAuth.OAuthController do }) end - defp do_authorize(conn, auth_attrs), do: do_authorize(conn, %{"authorization" => auth_attrs}) - def create_authorization( conn, %{"authorization" => _} = params,