インスタンスの対象言語の設定を実装
This commit is contained in:
		| @@ -130,6 +130,13 @@ export const meta = { | ||||
| 			desc: { | ||||
| 				'ja-JP': 'インスタンス管理者の連絡先メールアドレス' | ||||
| 			} | ||||
| 		}, | ||||
|  | ||||
| 		langs: { | ||||
| 			validator: $.arr($.str).optional, | ||||
| 			desc: { | ||||
| 				'ja-JP': 'インスタンスの対象言語' | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| }; | ||||
| @@ -205,6 +212,10 @@ export default define(meta, (ps) => new Promise(async (res, rej) => { | ||||
| 		set['maintainer.email'] = ps.maintainerEmail; | ||||
| 	} | ||||
|  | ||||
| 	if (ps.langs !== undefined) { | ||||
| 		set.langs = ps.langs; | ||||
| 	} | ||||
|  | ||||
| 	await Meta.update({}, { | ||||
| 		$set: set | ||||
| 	}, { upsert: true }); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 syuilo
					syuilo