summaryrefslogtreecommitdiff
path: root/src/server/api/endpoints/admin/announcements/create.ts
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/announcements/create.ts
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/announcements/create.ts')
-rw-r--r--src/server/api/endpoints/admin/announcements/create.ts46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/server/api/endpoints/admin/announcements/create.ts b/src/server/api/endpoints/admin/announcements/create.ts
index f9fb30f49f..dc01621c75 100644
--- a/src/server/api/endpoints/admin/announcements/create.ts
+++ b/src/server/api/endpoints/admin/announcements/create.ts
@@ -4,6 +4,11 @@ import { Announcements } from '../../../../../models';
import { genId } from '../../../../../misc/gen-id';
export const meta = {
+ desc: {
+ 'ja-JP': 'アナウンスを作成します。',
+ 'en-US': 'Create a announcement.'
+ },
+
tags: ['admin'],
requireCredential: true as const,
@@ -19,6 +24,47 @@ export const meta = {
imageUrl: {
validator: $.nullable.str.min(1)
}
+ },
+
+ 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',
+ description: 'The unique identifier for this Announcement.',
+ example: 'xxxxxxxxxx',
+ },
+ createdAt: {
+ type: 'string' as const,
+ optional: false as const, nullable: false as const,
+ format: 'date-time',
+ description: 'The date that the Announcement was created.'
+ },
+ updatedAt: {
+ type: 'string' as const,
+ optional: false as const, nullable: true as const,
+ format: 'date-time',
+ description: 'The date that the Announcement was updated.'
+ },
+ title: {
+ type: 'string' as const,
+ optional: false as const, nullable: false as const,
+ description: 'Announcement title.'
+ },
+ text: {
+ type: 'string' as const,
+ optional: false as const, nullable: false as const,
+ description: 'Announcement text.'
+ },
+ imageUrl: {
+ type: 'string' as const,
+ optional: false as const, nullable: true as const,
+ description: 'Announcement image.'
+ }
+ }
}
};