summaryrefslogtreecommitdiff
path: root/src/server/api/endpoints/admin/relays
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2021-03-06 22:34:51 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2021-03-06 22:34:51 +0900
commitdeda2b2782e37c925c67f730e4dd8770d4ef3034 (patch)
treeb6cfb688d446f85078cfaa819f463ac10488aec1 /src/server/api/endpoints/admin/relays
parentfix bug (diff)
parentAPIドキュメントの改善 (#6757) (diff)
downloadsharkey-deda2b2782e37c925c67f730e4dd8770d4ef3034.tar.gz
sharkey-deda2b2782e37c925c67f730e4dd8770d4ef3034.tar.bz2
sharkey-deda2b2782e37c925c67f730e4dd8770d4ef3034.zip
Merge branch 'develop' of https://github.com/syuilo/misskey into develop
Diffstat (limited to 'src/server/api/endpoints/admin/relays')
-rw-r--r--src/server/api/endpoints/admin/relays/add.ts30
-rw-r--r--src/server/api/endpoints/admin/relays/list.ts34
-rw-r--r--src/server/api/endpoints/admin/relays/remove.ts3
3 files changed, 64 insertions, 3 deletions
diff --git a/src/server/api/endpoints/admin/relays/add.ts b/src/server/api/endpoints/admin/relays/add.ts
index bcda1050e8..831e05c835 100644
--- a/src/server/api/endpoints/admin/relays/add.ts
+++ b/src/server/api/endpoints/admin/relays/add.ts
@@ -5,7 +5,8 @@ import { ApiError } from '../../../error';
export const meta = {
desc: {
- 'ja-JP': 'Add relay'
+ 'ja-JP': 'リレーを追加します。',
+ 'en-US': 'Add relay'
},
tags: ['admin'],
@@ -25,6 +26,33 @@ export const meta = {
code: 'INVALID_URL',
id: 'fb8c92d3-d4e5-44e7-b3d4-800d5cef8b2c'
},
+ },
+
+ res: {
+ type: 'object' as const,
+ optional: false as const, nullable: false as const,
+ properties: {
+ id: {
+ type: 'string' as const,
+ optional: false as const, nullable: false as const,
+ format: 'id'
+ },
+ inbox: {
+ type: 'string' as const,
+ optional: false as const, nullable: false as const,
+ format: 'url'
+ },
+ status: {
+ type: 'string' as const,
+ optional: false as const, nullable: false as const,
+ default: 'requesting',
+ enum: [
+ 'requesting',
+ 'accepted',
+ 'rejected'
+ ]
+ }
+ }
}
};
diff --git a/src/server/api/endpoints/admin/relays/list.ts b/src/server/api/endpoints/admin/relays/list.ts
index 3b132f73b3..da05ac0a24 100644
--- a/src/server/api/endpoints/admin/relays/list.ts
+++ b/src/server/api/endpoints/admin/relays/list.ts
@@ -3,7 +3,8 @@ import { listRelay } from '../../../../../services/relay';
export const meta = {
desc: {
- 'ja-JP': 'List relay'
+ 'ja-JP': 'リレー一覧を表示します。',
+ 'en-US': 'List relay'
},
tags: ['admin'],
@@ -13,6 +14,37 @@ export const meta = {
params: {
},
+
+ res: {
+ type: 'array' as const,
+ optional: false as const, nullable: false as const,
+ items: {
+ type: 'object' as const,
+ optional: false as const, nullable: false as const,
+ properties: {
+ id: {
+ type: 'string' as const,
+ optional: false as const, nullable: false as const,
+ format: 'id'
+ },
+ inbox: {
+ type: 'string' as const,
+ optional: false as const, nullable: false as const,
+ format: 'url'
+ },
+ status: {
+ type: 'string' as const,
+ optional: false as const, nullable: false as const,
+ default: 'requesting',
+ enum: [
+ 'requesting',
+ 'accepted',
+ 'rejected'
+ ]
+ }
+ }
+ }
+ }
};
export default define(meta, async (ps, user) => {
diff --git a/src/server/api/endpoints/admin/relays/remove.ts b/src/server/api/endpoints/admin/relays/remove.ts
index df95e0329a..572d51cfca 100644
--- a/src/server/api/endpoints/admin/relays/remove.ts
+++ b/src/server/api/endpoints/admin/relays/remove.ts
@@ -4,7 +4,8 @@ import { removeRelay } from '../../../../../services/relay';
export const meta = {
desc: {
- 'ja-JP': 'Remove relay'
+ 'ja-JP': 'リレーを削除します。',
+ 'en-US': 'Remove relay'
},
tags: ['admin'],