diff options
author | lain <lain@soykaf.club> | 2021-12-15 21:26:45 +0000 |
---|---|---|
committer | lain <lain@soykaf.club> | 2021-12-15 21:26:45 +0000 |
commit | 6eb7d69e60a96e577de92de232ed48e509f23cd4 (patch) | |
tree | a3d3e6da9c21ec31bd696c4e806ea1e5ea970181 /lib/pleroma/web/api_spec | |
parent | fb0aa0661c0a2a8da85973e2c3f9567e83cba587 (diff) | |
parent | 8672ad6b00e1bba59cd6e4f0a09fd26bc6ba6bd6 (diff) | |
download | pleroma-6eb7d69e60a96e577de92de232ed48e509f23cd4.tar.gz |
Merge branch 'delete-account-fix' into 'develop'
TwitterAPI: allow deleting one's own account with request body
Closes #2799 and #2746
See merge request pleroma/pleroma!3564
Diffstat (limited to 'lib/pleroma/web/api_spec')
-rw-r--r-- | lib/pleroma/web/api_spec/operations/twitter_util_operation.ex | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/pleroma/web/api_spec/operations/twitter_util_operation.ex b/lib/pleroma/web/api_spec/operations/twitter_util_operation.ex index ebcfd3be2..5a2b0bc49 100644 --- a/lib/pleroma/web/api_spec/operations/twitter_util_operation.ex +++ b/lib/pleroma/web/api_spec/operations/twitter_util_operation.ex @@ -191,6 +191,7 @@ defmodule Pleroma.Web.ApiSpec.TwitterUtilOperation do parameters: [ Operation.parameter(:password, :query, :string, "Password") ], + requestBody: request_body("Parameters", delete_account_request(), required: false), responses: %{ 200 => Operation.response("Success", "application/json", %Schema{ @@ -237,4 +238,22 @@ defmodule Pleroma.Web.ApiSpec.TwitterUtilOperation do responses: %{200 => Operation.response("Web Page", "test/html", %Schema{type: :string})} } end + + defp delete_account_request do + %Schema{ + title: "AccountDeleteRequest", + description: "POST body for deleting one's own account", + type: :object, + properties: %{ + password: %Schema{ + type: :string, + description: "The user's own password for confirmation.", + format: :password + } + }, + example: %{ + "password" => "prettyp0ony1313" + } + } + end end |