X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fpleroma%2Fweb%2Fapi_spec%2Foperations%2Fpleroma_account_operation.ex;h=caa13afee8541ff4053c288ba8fd93cf130b1bb8;hb=9272cef500308862d0d86be329bad7f41c66d4ad;hp=1040f6e205c53f6ab8f9a1c1a845aed2e9e6c9da;hpb=d0eb43b58b0a191b727360cf4523329d2dc60adc;p=akkoma
diff --git a/lib/pleroma/web/api_spec/operations/pleroma_account_operation.ex b/lib/pleroma/web/api_spec/operations/pleroma_account_operation.ex
index 1040f6e20..caa13afee 100644
--- a/lib/pleroma/web/api_spec/operations/pleroma_account_operation.ex
+++ b/lib/pleroma/web/api_spec/operations/pleroma_account_operation.ex
@@ -1,11 +1,9 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors
+# Copyright © 2017-2021 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.ApiSpec.PleromaAccountOperation do
alias OpenApiSpex.Operation
- alias OpenApiSpex.Schema
- alias Pleroma.Web.ApiSpec.Schemas.Account
alias Pleroma.Web.ApiSpec.Schemas.AccountRelationship
alias Pleroma.Web.ApiSpec.Schemas.ApiError
alias Pleroma.Web.ApiSpec.Schemas.FlakeID
@@ -89,54 +87,10 @@ defmodule Pleroma.Web.ApiSpec.PleromaAccountOperation do
}
end
- def add_aliases_operation do
- %Operation{
- tags: ["Accounts"],
- summary: "Add ActivityPub aliases",
- operationId: "PleromaAPI.AccountController.add_aliases",
- requestBody: request_body("Parameters", alias_request(), required: true),
- security: [%{"oAuth" => ["write:accounts"]}],
- responses: %{
- 200 => Operation.response("Account", "application/json", Account),
- 403 => Operation.response("Forbidden", "application/json", ApiError)
- }
- }
- end
-
- def delete_aliases_operation do
- %Operation{
- tags: ["Accounts"],
- summary: "Delete ActivityPub aliases",
- operationId: "PleromaAPI.AccountController.delete_aliases",
- requestBody: request_body("Parameters", alias_request(), required: true),
- security: [%{"oAuth" => ["write:accounts"]}],
- responses: %{
- 200 => Operation.response("Account", "application/json", Account)
- }
- }
- end
-
defp id_param do
Operation.parameter(:id, :path, FlakeID, "Account ID",
example: "9umDrYheeY451cQnEe",
required: true
)
end
-
- defp alias_request do
- %Schema{
- title: "AccountAliasRequest",
- description: "POST body for adding/deleting AP aliases",
- type: :object,
- properties: %{
- aliases: %Schema{
- type: :array,
- items: %Schema{type: :string}
- }
- },
- example: %{
- "aliases" => ["https://beepboop.social/users/beep", "https://mushroom.kingdom/users/toad"]
- }
- }
- end
end