From: Ivan Tashkinov Date: Tue, 28 Apr 2020 16:56:20 +0000 (+0300) Subject: Merge remote-tracking branch 'remotes/origin/develop' into automatic-authentication... X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=908cf22a6cb07044eb0fb44c9673c8adcf22c0db;p=akkoma Merge remote-tracking branch 'remotes/origin/develop' into automatic-authentication-and-instance-publicity-checks # Conflicts: # lib/pleroma/web/mastodon_api/controllers/account_controller.ex --- 908cf22a6cb07044eb0fb44c9673c8adcf22c0db diff --cc lib/pleroma/web/mastodon_api/controllers/account_controller.ex index f39825e08,37adeec5f..1eedf02d6 --- a/lib/pleroma/web/mastodon_api/controllers/account_controller.ex +++ b/lib/pleroma/web/mastodon_api/controllers/account_controller.ex @@@ -27,9 -26,9 +27,11 @@@ defmodule Pleroma.Web.MastodonAPI.Accou alias Pleroma.Web.OAuth.Token alias Pleroma.Web.TwitterAPI.TwitterAPI + plug(OpenApiSpex.Plug.CastAndValidate, render_error: Pleroma.Web.ApiSpec.RenderError) + - plug(:skip_plug, OAuthScopesPlug when action == :identity_proofs) + plug(:skip_plug, [OAuthScopesPlug, EnsurePublicOrAuthenticatedPlug] when action == :create) + + plug(:skip_plug, EnsurePublicOrAuthenticatedPlug when action in [:show, :statuses]) plug( OAuthScopesPlug, @@@ -359,7 -378,7 +381,7 @@@ end @doc "POST /api/v1/follows" - def follow_by_uri(conn, %{"uri" => uri}) do - def follows(%{body_params: %{uri: uri}} = conn, _) do ++ def follow_by_uri(%{body_params: %{uri: uri}} = conn, _) do case User.get_cached_by_nickname(uri) do %User{} = user -> conn