projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'pleroma/develop' into staff-plug
[akkoma]
/
lib
/
pleroma
/
web
/
api_spec
/
operations
/
admin
/
relay_operation.ex
diff --git
a/lib/pleroma/web/api_spec/operations/admin/relay_operation.ex
b/lib/pleroma/web/api_spec/operations/admin/relay_operation.ex
index e06b2d1645cc8af739de6a3937c45184e336e75e..c55c84fee8c9509b0a557869d32cb910e2523fc2 100644
(file)
--- a/
lib/pleroma/web/api_spec/operations/admin/relay_operation.ex
+++ b/
lib/pleroma/web/api_spec/operations/admin/relay_operation.ex
@@
-1,5
+1,5
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-202
0
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-202
1
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.ApiSpec.Admin.RelayOperation do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.ApiSpec.Admin.RelayOperation do
@@
-15,10
+15,10
@@
defmodule Pleroma.Web.ApiSpec.Admin.RelayOperation do
def index_operation do
%Operation{
def index_operation do
%Operation{
- tags: ["
Admin", "
Relays"],
- summary: "
List R
elays",
+ tags: ["Relays"],
+ summary: "
Retrieve a list of r
elays",
operationId: "AdminAPI.RelayController.index",
operationId: "AdminAPI.RelayController.index",
- security: [%{"oAuth" => ["read"]}],
+ security: [%{"oAuth" => ["
admin:
read"]}],
parameters: admin_api_params(),
responses: %{
200 =>
parameters: admin_api_params(),
responses: %{
200 =>
@@
-37,10
+37,10
@@
defmodule Pleroma.Web.ApiSpec.Admin.RelayOperation do
def follow_operation do
%Operation{
def follow_operation do
%Operation{
- tags: ["
Admin", "
Relays"],
- summary: "Follow a
R
elay",
+ tags: ["Relays"],
+ summary: "Follow a
r
elay",
operationId: "AdminAPI.RelayController.follow",
operationId: "AdminAPI.RelayController.follow",
- security: [%{"oAuth" => ["write:follows"]}],
+ security: [%{"oAuth" => ["
admin:
write:follows"]}],
parameters: admin_api_params(),
requestBody: request_body("Parameters", relay_url()),
responses: %{
parameters: admin_api_params(),
requestBody: request_body("Parameters", relay_url()),
responses: %{
@@
-51,12
+51,12
@@
defmodule Pleroma.Web.ApiSpec.Admin.RelayOperation do
def unfollow_operation do
%Operation{
def unfollow_operation do
%Operation{
- tags: ["
Admin", "
Relays"],
- summary: "Unfollow a
R
elay",
+ tags: ["Relays"],
+ summary: "Unfollow a
r
elay",
operationId: "AdminAPI.RelayController.unfollow",
operationId: "AdminAPI.RelayController.unfollow",
- security: [%{"oAuth" => ["write:follows"]}],
+ security: [%{"oAuth" => ["
admin:
write:follows"]}],
parameters: admin_api_params(),
parameters: admin_api_params(),
- requestBody: request_body("Parameters", relay_u
rl
()),
+ requestBody: request_body("Parameters", relay_u
nfollow
()),
responses: %{
200 =>
Operation.response("Status", "application/json", %Schema{
responses: %{
200 =>
Operation.response("Status", "application/json", %Schema{
@@
-91,4
+91,14
@@
defmodule Pleroma.Web.ApiSpec.Admin.RelayOperation do
}
}
end
}
}
end
+
+ defp relay_unfollow do
+ %Schema{
+ type: :object,
+ properties: %{
+ relay_url: %Schema{type: :string, format: :uri},
+ force: %Schema{type: :boolean, default: false}
+ }
+ }
+ end
end
end