投稿の最大文字数情報を設定ファイルではなくDBに保存するように
This commit is contained in:
parent
10c434f24a
commit
d7a3b71028
10 changed files with 37 additions and 16 deletions
|
@ -59,6 +59,13 @@ export const meta = {
|
|||
'ja-JP': 'インスタンスの紹介文'
|
||||
}
|
||||
},
|
||||
|
||||
maxNoteTextLength: {
|
||||
validator: $.num.optional.min(1),
|
||||
desc: {
|
||||
'ja-JP': '投稿の最大文字数'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -93,6 +100,10 @@ export default define(meta, (ps) => new Promise(async (res, rej) => {
|
|||
set.description = ps.description;
|
||||
}
|
||||
|
||||
if (ps.maxNoteTextLength) {
|
||||
set.maxNoteTextLength = ps.maxNoteTextLength;
|
||||
}
|
||||
|
||||
await Meta.update({}, {
|
||||
$set: set
|
||||
}, { upsert: true });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue