projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into seanking/pleroma...
[akkoma]
/
lib
/
pleroma
/
web
/
mastodon_api
/
controllers
/
app_controller.ex
diff --git
a/lib/pleroma/web/mastodon_api/controllers/app_controller.ex
b/lib/pleroma/web/mastodon_api/controllers/app_controller.ex
index 005c604447e3999cf756ec2dd1b842930d46df5e..a516b6c204d614be2d2cd39775f2779e1cc10f17 100644
(file)
--- a/
lib/pleroma/web/mastodon_api/controllers/app_controller.ex
+++ b/
lib/pleroma/web/mastodon_api/controllers/app_controller.ex
@@
-5,6
+5,7
@@
defmodule Pleroma.Web.MastodonAPI.AppController do
use Pleroma.Web, :controller
defmodule Pleroma.Web.MastodonAPI.AppController do
use Pleroma.Web, :controller
+ alias Pleroma.Plugs.EnsurePublicOrAuthenticatedPlug
alias Pleroma.Plugs.OAuthScopesPlug
alias Pleroma.Repo
alias Pleroma.Web.OAuth.App
alias Pleroma.Plugs.OAuthScopesPlug
alias Pleroma.Repo
alias Pleroma.Web.OAuth.App
@@
-13,8
+14,15
@@
defmodule Pleroma.Web.MastodonAPI.AppController do
action_fallback(Pleroma.Web.MastodonAPI.FallbackController)
action_fallback(Pleroma.Web.MastodonAPI.FallbackController)
+ plug(
+ :skip_plug,
+ [OAuthScopesPlug, EnsurePublicOrAuthenticatedPlug]
+ when action == :create
+ )
+
plug(OAuthScopesPlug, %{scopes: ["read"]} when action == :verify_credentials)
plug(OAuthScopesPlug, %{scopes: ["read"]} when action == :verify_credentials)
- plug(OpenApiSpex.Plug.CastAndValidate)
+
+ plug(Pleroma.Web.ApiSpec.CastAndValidate)
@local_mastodon_name "Mastodon-Local"
@local_mastodon_name "Mastodon-Local"