Merge remote-tracking branch 'remotes/origin/develop' into automatic-authentication...
authorIvan Tashkinov <ivantashkinov@gmail.com>
Tue, 28 Apr 2020 16:56:20 +0000 (19:56 +0300)
committerIvan Tashkinov <ivantashkinov@gmail.com>
Tue, 28 Apr 2020 16:56:20 +0000 (19:56 +0300)
# Conflicts:
# lib/pleroma/web/mastodon_api/controllers/account_controller.ex

1  2 
lib/pleroma/web/mastodon_api/controllers/account_controller.ex
lib/pleroma/web/mastodon_api/controllers/status_controller.ex
lib/pleroma/web/mastodon_api/controllers/timeline_controller.ex

index f39825e08838f2e638f7721afd9ea05be9d5e832,37adeec5f0739a318fbecec2488763c7e42ccd44..1eedf02d66a823d0cfc62ce60e2dc964b3252679
@@@ -27,9 -26,9 +27,11 @@@ defmodule Pleroma.Web.MastodonAPI.Accou
    alias Pleroma.Web.OAuth.Token
    alias Pleroma.Web.TwitterAPI.TwitterAPI
  
 -  plug(:skip_plug, OAuthScopesPlug when action == :identity_proofs)
+   plug(OpenApiSpex.Plug.CastAndValidate, render_error: Pleroma.Web.ApiSpec.RenderError)
 +  plug(:skip_plug, [OAuthScopesPlug, EnsurePublicOrAuthenticatedPlug] when action == :create)
 +
 +  plug(:skip_plug, EnsurePublicOrAuthenticatedPlug when action in [:show, :statuses])
  
    plug(
      OAuthScopesPlug,
    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