Undo API breaking changes

This commit is contained in:
Mark Felder 2020-10-14 11:03:17 -05:00
commit ed61002815
8 changed files with 21 additions and 21 deletions

View file

@ -519,7 +519,7 @@ defmodule Pleroma.Web.ApiSpec.AccountOperation do
description: "Header image encoded using multipart/form-data",
format: :binary
},
is_locked: %Schema{
locked: %Schema{
allOf: [BooleanLike],
nullable: true,
description: "Whether manual approval of follow requests is required."

View file

@ -259,7 +259,7 @@ defmodule Pleroma.Web.ApiSpec.ChatOperation do
"fields" => []
},
"statuses_count" => 1,
"is_locked" => false,
"locked" => false,
"created_at" => "2020-04-16T13:40:15.000Z",
"display_name" => "lain",
"fields" => [],

View file

@ -32,7 +32,7 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Account do
header_static: %Schema{type: :string, format: :uri},
header: %Schema{type: :string, format: :uri},
id: FlakeID,
is_locked: %Schema{type: :boolean},
locked: %Schema{type: :boolean},
note: %Schema{type: :string, format: :html},
statuses_count: %Schema{type: :integer},
url: %Schema{type: :string, format: :uri},
@ -159,7 +159,7 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Account do
"header" => "https://mypleroma.com/images/banner.png",
"header_static" => "https://mypleroma.com/images/banner.png",
"id" => "9tKi3esbG7OQgZ2920",
"is_locked" => false,
"locked" => false,
"note" => "cofe",
"pleroma" => %{
"allow_following_move" => true,

View file

@ -177,7 +177,6 @@ defmodule Pleroma.Web.MastodonAPI.AccountController do
user_params =
[
:no_rich_text,
:is_locked,
:hide_followers_count,
:hide_follows_count,
:hide_followers,
@ -210,6 +209,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountController do
if bot, do: {:ok, "Service"}, else: {:ok, "Person"}
end)
|> Maps.put_if_present(:actor_type, params[:actor_type])
|> Maps.put_if_present(:is_locked, params[:locked])
# What happens here:
#

View file

@ -242,7 +242,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do
username: username_from_nickname(user.nickname),
acct: user.nickname,
display_name: display_name,
is_locked: user.is_locked,
locked: user.is_locked,
created_at: Utils.to_masto_date(user.inserted_at),
followers_count: followers_count,
following_count: following_count,