mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-29 21:37:34 -07:00
validate blank messages on backend
This commit is contained in:
parent
82c9428b45
commit
7420f6ce56
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue