projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'develop' into global-status-expiration
[akkoma]
/
lib
/
pleroma
/
web
/
oauth
/
scopes.ex
diff --git
a/lib/pleroma/web/oauth/scopes.ex
b/lib/pleroma/web/oauth/scopes.ex
index 8ecf901f3085112f008a8c3142c7d61637f241e4..1023f16d4911cb0fc3c4b8334d1b6cf9cd742300 100644
(file)
--- a/
lib/pleroma/web/oauth/scopes.ex
+++ b/
lib/pleroma/web/oauth/scopes.ex
@@
-15,7
+15,12
@@
defmodule Pleroma.Web.OAuth.Scopes do
Note: `scopes` is used by Mastodon — supporting it but sticking to
OAuth's standard `scope` wherever we control it
"""
Note: `scopes` is used by Mastodon — supporting it but sticking to
OAuth's standard `scope` wherever we control it
"""
- @spec fetch_scopes(map(), list()) :: list()
+ @spec fetch_scopes(map() | struct(), list()) :: list()
+
+ def fetch_scopes(%Pleroma.Web.ApiSpec.Schemas.AppCreateRequest{scopes: scopes}, default) do
+ parse_scopes(scopes, default)
+ end
+
def fetch_scopes(params, default) do
parse_scopes(params["scope"] || params["scopes"], default)
end
def fetch_scopes(params, default) do
parse_scopes(params["scope"] || params["scopes"], default)
end