投稿の最大文字数情報を設定ファイルではなくDBに保存するように
This commit is contained in:
		| @@ -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 }); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 syuilo
					syuilo