Undo API breaking changes
This commit is contained in:
parent
4ead0d564f
commit
3242cfef20
4 changed files with 9 additions and 9 deletions
|
@ -606,7 +606,7 @@ defp update_credentials_request do
|
||||||
description: "Sets the background image of the user.",
|
description: "Sets the background image of the user.",
|
||||||
format: :binary
|
format: :binary
|
||||||
},
|
},
|
||||||
is_discoverable: %Schema{
|
discoverable: %Schema{
|
||||||
allOf: [BooleanLike],
|
allOf: [BooleanLike],
|
||||||
nullable: true,
|
nullable: true,
|
||||||
description:
|
description:
|
||||||
|
@ -630,7 +630,7 @@ defp update_credentials_request do
|
||||||
pleroma_settings_store: %{"pleroma-fe" => %{"key" => "val"}},
|
pleroma_settings_store: %{"pleroma-fe" => %{"key" => "val"}},
|
||||||
skip_thread_containment: false,
|
skip_thread_containment: false,
|
||||||
allow_following_move: false,
|
allow_following_move: false,
|
||||||
is_discoverable: false,
|
discoverable: false,
|
||||||
actor_type: "Person"
|
actor_type: "Person"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -253,7 +253,7 @@ def chats_response do
|
||||||
"sensitive" => false,
|
"sensitive" => false,
|
||||||
"note" => "lain",
|
"note" => "lain",
|
||||||
"pleroma" => %{
|
"pleroma" => %{
|
||||||
"is_discoverable" => false,
|
"discoverable" => false,
|
||||||
"actor_type" => "Person"
|
"actor_type" => "Person"
|
||||||
},
|
},
|
||||||
"fields" => []
|
"fields" => []
|
||||||
|
|
|
@ -124,7 +124,7 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Account do
|
||||||
type: :object,
|
type: :object,
|
||||||
properties: %{
|
properties: %{
|
||||||
actor_type: ActorType,
|
actor_type: ActorType,
|
||||||
is_discoverable: %Schema{
|
discoverable: %Schema{
|
||||||
type: :boolean,
|
type: :boolean,
|
||||||
description:
|
description:
|
||||||
"whether the user allows discovery of the account in search results and other services."
|
"whether the user allows discovery of the account in search results and other services."
|
||||||
|
@ -205,7 +205,7 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Account do
|
||||||
"note" => "foobar",
|
"note" => "foobar",
|
||||||
"pleroma" => %{
|
"pleroma" => %{
|
||||||
"actor_type" => "Person",
|
"actor_type" => "Person",
|
||||||
"is_discoverable" => false,
|
"discoverable" => false,
|
||||||
"no_rich_text" => false,
|
"no_rich_text" => false,
|
||||||
"show_role" => true
|
"show_role" => true
|
||||||
},
|
},
|
||||||
|
|
|
@ -147,14 +147,14 @@ test "updates the user's hide_followers status", %{conn: conn} do
|
||||||
end
|
end
|
||||||
|
|
||||||
test "updates the user's discoverable status", %{conn: conn} do
|
test "updates the user's discoverable status", %{conn: conn} do
|
||||||
assert %{"source" => %{"pleroma" => %{"is_discoverable" => true}}} =
|
assert %{"source" => %{"pleroma" => %{"discoverable" => true}}} =
|
||||||
conn
|
conn
|
||||||
|> patch("/api/v1/accounts/update_credentials", %{is_discoverable: "true"})
|
|> patch("/api/v1/accounts/update_credentials", %{discoverable: "true"})
|
||||||
|> json_response_and_validate_schema(:ok)
|
|> json_response_and_validate_schema(:ok)
|
||||||
|
|
||||||
assert %{"source" => %{"pleroma" => %{"is_discoverable" => false}}} =
|
assert %{"source" => %{"pleroma" => %{"discoverable" => false}}} =
|
||||||
conn
|
conn
|
||||||
|> patch("/api/v1/accounts/update_credentials", %{is_discoverable: "false"})
|
|> patch("/api/v1/accounts/update_credentials", %{discoverable: "false"})
|
||||||
|> json_response_and_validate_schema(:ok)
|
|> json_response_and_validate_schema(:ok)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue