Improve doc
This commit is contained in:
		| @@ -13,10 +13,10 @@ export const meta = { | ||||
| 	requireModerator: true, | ||||
|  | ||||
| 	params: { | ||||
| 		broadcasts: { | ||||
| 		announcements: { | ||||
| 			validator: $.optional.nullable.arr($.obj()), | ||||
| 			desc: { | ||||
| 				'ja-JP': 'ブロードキャスト' | ||||
| 				'ja-JP': 'お知らせ' | ||||
| 			} | ||||
| 		}, | ||||
|  | ||||
| @@ -328,8 +328,8 @@ export const meta = { | ||||
| export default define(meta, async (ps) => { | ||||
| 	const set = {} as any; | ||||
|  | ||||
| 	if (ps.broadcasts) { | ||||
| 		set.broadcasts = ps.broadcasts; | ||||
| 	if (ps.announcements) { | ||||
| 		set.announcements = ps.announcements; | ||||
| 	} | ||||
|  | ||||
| 	if (typeof ps.disableRegistration === 'boolean') { | ||||
|   | ||||
| @@ -12,7 +12,19 @@ export const meta = { | ||||
|  | ||||
| 	requireCredential: true, | ||||
|  | ||||
| 	kind: 'drive-read' | ||||
| 	kind: 'drive-read', | ||||
|  | ||||
| 	res: { | ||||
| 		type: 'object', | ||||
| 		properties: { | ||||
| 			capacity: { | ||||
| 				type: 'number' | ||||
| 			}, | ||||
| 			usage: { | ||||
| 				type: 'number' | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| }; | ||||
|  | ||||
| export default define(meta, async (ps, user) => { | ||||
|   | ||||
| @@ -24,6 +24,54 @@ export const meta = { | ||||
| 			default: true | ||||
| 		} | ||||
| 	}, | ||||
|  | ||||
| 	res: { | ||||
| 		type: 'object', | ||||
| 		properties: { | ||||
| 			version: { | ||||
| 				type: 'string', | ||||
| 				description: 'The version of Misskey of this instance.', | ||||
| 				example: pkg.version | ||||
| 			}, | ||||
| 			name: { | ||||
| 				type: 'string', | ||||
| 				description: 'The name of this instance.', | ||||
| 			}, | ||||
| 			description: { | ||||
| 				type: 'string', | ||||
| 				description: 'The description of this instance.', | ||||
| 			}, | ||||
| 			announcements: { | ||||
| 				type: 'array', | ||||
| 				items: { | ||||
| 					type: 'object', | ||||
| 					properties: { | ||||
| 						title: { | ||||
| 							type: 'string', | ||||
| 							description: 'The title of the announcement.', | ||||
| 						}, | ||||
| 						text: { | ||||
| 							type: 'string', | ||||
| 							description: 'The text of the announcement. (can be HTML)', | ||||
| 						}, | ||||
| 					} | ||||
| 				}, | ||||
| 				description: 'The description of this instance.', | ||||
| 			}, | ||||
| 			disableRegistration: { | ||||
| 				type: 'boolean', | ||||
| 				description: 'Whether disabled open registration.', | ||||
| 			}, | ||||
| 			disableLocalTimeline: { | ||||
| 				type: 'boolean', | ||||
| 				description: 'Whether disabled LTL and STL.', | ||||
| 			}, | ||||
| 			disableGlobalTimeline: { | ||||
| 				type: 'boolean', | ||||
| 				description: 'Whether disabled GTL.', | ||||
| 			}, | ||||
| 		} | ||||
| 	} | ||||
| }; | ||||
|  | ||||
| export default define(meta, async (ps, me) => { | ||||
| @@ -55,7 +103,7 @@ export default define(meta, async (ps, me) => { | ||||
| 			cores: os.cpus().length | ||||
| 		}, | ||||
|  | ||||
| 		broadcasts: instance.broadcasts || [], | ||||
| 		announcements: instance.announcements || [], | ||||
| 		disableRegistration: instance.disableRegistration, | ||||
| 		disableLocalTimeline: instance.disableLocalTimeline, | ||||
| 		disableGlobalTimeline: instance.disableGlobalTimeline, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 syuilo
					syuilo