aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/mastodon_api/controllers/account_controller.ex
diff options
context:
space:
mode:
authorAlex Gleason <alex@alexgleason.me>2021-08-04 11:48:57 -0500
committerAlex Gleason <alex@alexgleason.me>2021-08-04 11:48:57 -0500
commit44ede0657f2da0a761de76b1f9822a293430d497 (patch)
tree387a8915bdb6ff1295f4f0872b2e6bc97e177831 /lib/pleroma/web/mastodon_api/controllers/account_controller.ex
parent1f093cb216ed0d6b0d23b05e1ffbbf55dc72bbee (diff)
parentd8a986c9e893de8eed3aa336a557695669b1ffee (diff)
downloadpleroma-44ede0657f2da0a761de76b1f9822a293430d497.tar.gz
Merge remote-tracking branch 'pleroma/develop' into staff-plug
Diffstat (limited to 'lib/pleroma/web/mastodon_api/controllers/account_controller.ex')
-rw-r--r--lib/pleroma/web/mastodon_api/controllers/account_controller.ex9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/pleroma/web/mastodon_api/controllers/account_controller.ex b/lib/pleroma/web/mastodon_api/controllers/account_controller.ex
index 7a1e99044..5fcbffc34 100644
--- a/lib/pleroma/web/mastodon_api/controllers/account_controller.ex
+++ b/lib/pleroma/web/mastodon_api/controllers/account_controller.ex
@@ -8,7 +8,6 @@ defmodule Pleroma.Web.MastodonAPI.AccountController do
import Pleroma.Web.ControllerHelper,
only: [
add_link_headers: 2,
- truthy_param?: 1,
assign_account_by_id: 2,
embed_relationships?: 1,
json_response: 3
@@ -25,16 +24,16 @@ defmodule Pleroma.Web.MastodonAPI.AccountController do
alias Pleroma.Web.MastodonAPI.MastodonAPIController
alias Pleroma.Web.MastodonAPI.StatusView
alias Pleroma.Web.OAuth.OAuthController
- alias Pleroma.Web.Plugs.EnsurePublicOrAuthenticatedPlug
alias Pleroma.Web.Plugs.OAuthScopesPlug
alias Pleroma.Web.Plugs.RateLimiter
alias Pleroma.Web.TwitterAPI.TwitterAPI
+ alias Pleroma.Web.Utils.Params
plug(Pleroma.Web.ApiSpec.CastAndValidate)
- plug(:skip_plug, [OAuthScopesPlug, EnsurePublicOrAuthenticatedPlug] when action == :create)
+ plug(:skip_auth when action == :create)
- plug(:skip_plug, EnsurePublicOrAuthenticatedPlug when action in [:show, :statuses])
+ plug(:skip_public_check when action in [:show, :statuses])
plug(
OAuthScopesPlug,
@@ -188,7 +187,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountController do
:accepts_chat_messages
]
|> Enum.reduce(%{}, fn key, acc ->
- Maps.put_if_present(acc, key, params[key], &{:ok, truthy_param?(&1)})
+ Maps.put_if_present(acc, key, params[key], &{:ok, Params.truthy_param?(&1)})
end)
|> Maps.put_if_present(:name, params[:display_name])
|> Maps.put_if_present(:bio, params[:note])