Skip to content
Snippets Groups Projects
Commit 128aae05 authored by Ivan Tashkinov's avatar Ivan Tashkinov
Browse files

[#923] Minor semantic adjustment.

parent c3f12cf3
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment