Merge branch 'fix/cast-and-validate' into 'develop'

Fix CastAndValidate plug

Closes #1889

See merge request pleroma/pleroma!2704
This commit is contained in:
lain 2020-06-29 15:59:40 +00:00
commit b2b332984c
2 changed files with 1 additions and 2 deletions

View File

@ -40,7 +40,7 @@ defmodule Pleroma.Web.ApiSpec.CastAndValidate do
|> List.first() |> List.first()
_ -> _ ->
nil "application/json"
end end
private_data = Map.put(private_data, :operation_id, operation_id) private_data = Map.put(private_data, :operation_id, operation_id)

View File

@ -780,7 +780,6 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
assert %{"id" => _id, "muting" => true, "muting_notifications" => true} = assert %{"id" => _id, "muting" => true, "muting_notifications" => true} =
conn conn
|> put_req_header("content-type", "application/json")
|> post("/api/v1/accounts/#{other_user.id}/mute") |> post("/api/v1/accounts/#{other_user.id}/mute")
|> json_response_and_validate_schema(200) |> json_response_and_validate_schema(200)