Merge remote-tracking branch 'origin/develop' into remote-follow-api
authormarcin mikołajczak <git@mkljczk.pl>
Fri, 24 Dec 2021 23:52:02 +0000 (00:52 +0100)
committermarcin mikołajczak <git@mkljczk.pl>
Fri, 24 Dec 2021 23:52:02 +0000 (00:52 +0100)
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
1  2 
lib/pleroma/web/api_spec/operations/twitter_util_operation.ex
lib/pleroma/web/router.ex
lib/pleroma/web/twitter_api/controllers/util_controller.ex

index 1a2dbb16652446fa258986e444f90d46c6b82344,5a2b0bc49d574a79ed31b081fde5f01e742c03db..2a701066d409549e5fcdde77fcc04a0558cc7db9
@@@ -238,29 -239,21 +239,47 @@@ defmodule Pleroma.Web.ApiSpec.TwitterUt
      }
    end
  
 +  def remote_interaction_operation do
 +    %Operation{
 +      tags: ["Accounts"],
 +      summary: "Remote interaction",
 +      operationId: "UtilController.remote_interaction",
 +      requestBody: request_body("Parameters", remote_interaction_request(), required: true),
 +      responses: %{
 +        200 =>
 +          Operation.response("Remote interaction URL", "application/json", %Schema{type: :object})
 +      }
 +    }
 +  end
 +
 +  defp remote_interaction_request do
 +    %Schema{
 +      title: "RemoteInteractionRequest",
 +      description: "POST body for remote interaction",
 +      type: :object,
 +      required: [:ap_id, :profile],
 +      properties: %{
 +        ap_id: %Schema{type: :string, description: "Profile or status ActivityPub ID"},
 +        profile: %Schema{type: :string, description: "Remote profile webfinger"}
 +      }
 +    }
 +  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
Simple merge