インスタンスの対象言語の設定を実装

This commit is contained in:
syuilo 2018-11-07 12:28:53 +09:00
parent 1585bb12cf
commit 001bb7bbcd
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69
6 changed files with 22 additions and 1 deletions

View file

@ -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 });