[#468] Refactored OAuth scopes parsing / defaults handling.
This commit is contained in:
parent
949e35e26d
commit
027adbc9e5
4 changed files with 28 additions and 22 deletions
|
|
@ -5,6 +5,10 @@
|
|||
defmodule Pleroma.Web.ControllerHelper do
|
||||
use Pleroma.Web, :controller
|
||||
|
||||
def oauth_scopes(params, default) do
|
||||
Pleroma.Web.OAuth.parse_scopes(params["scopes"] || params["scope"], default)
|
||||
end
|
||||
|
||||
def json_response(conn, status, json) do
|
||||
conn
|
||||
|> put_status(status)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue