validate blank messages on backend
This commit is contained in:
parent
4c4c641804
commit
43bca8ed38
|
@ -151,7 +151,7 @@ export default define(meta, paramDef, async (ps, user) => {
|
|||
}
|
||||
|
||||
// テキストが無いかつ添付ファイルも無かったらエラー
|
||||
if (ps.text == null && file == null) {
|
||||
if ((ps.text == null || ps.text.trim() === '') && file == null) {
|
||||
throw new ApiError(meta.errors.contentRequired);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue