fix scopes plug
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
d1d512bf1f
commit
b5a1a152fc
2 changed files with 2 additions and 2 deletions
|
@ -12,7 +12,7 @@ defmodule Pleroma.Web.AdminAPI.ImportController do
|
|||
alias Pleroma.Web.ApiSpec
|
||||
alias Pleroma.Web.Plugs.OAuthScopesPlug
|
||||
|
||||
plug(OAuthScopesPlug, %{scopes: ["admin:write"]} when action == :collection)
|
||||
plug(OAuthScopesPlug, %{scopes: ["admin:write"]} when action in [:collection, :archive])
|
||||
|
||||
plug(Pleroma.Web.ApiSpec.CastAndValidate)
|
||||
defdelegate open_api_operation(action), to: ApiSpec.Admin.ImportOperation
|
||||
|
|
|
@ -14,7 +14,7 @@ defmodule Pleroma.Web.PleromaAPI.UserImportController do
|
|||
plug(OAuthScopesPlug, %{scopes: ["follow", "write:follows"]} when action == :follow)
|
||||
plug(OAuthScopesPlug, %{scopes: ["follow", "write:blocks"]} when action == :blocks)
|
||||
plug(OAuthScopesPlug, %{scopes: ["follow", "write:mutes"]} when action == :mutes)
|
||||
plug(OAuthScopesPlug, %{scopes: ["follow", "write:statuses"]} when action == :collection)
|
||||
plug(OAuthScopesPlug, %{scopes: ["follow", "write:statuses"]} when action in [:collection, :archive])
|
||||
|
||||
plug(Pleroma.Web.ApiSpec.CastAndValidate, replace_params: false)
|
||||
defdelegate open_api_operation(action), to: ApiSpec.UserImportOperation
|
||||
|
|
Loading…
Reference in a new issue