diff options
| author | momf <m0fqn090310@gmail.com> | 2018-06-08 22:00:18 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-06-08 22:00:18 +0900 |
| commit | 02e6b732e9ccf7c40c43d68b7bb514692ceafb4f (patch) | |
| tree | bf982ef1004bc35d9b9b131946febfc5f07a4b61 /src/server/api/endpoints/notes/create.ts | |
| parent | 2.33.1 (diff) | |
| download | sharkey-02e6b732e9ccf7c40c43d68b7bb514692ceafb4f.tar.gz sharkey-02e6b732e9ccf7c40c43d68b7bb514692ceafb4f.tar.bz2 sharkey-02e6b732e9ccf7c40c43d68b7bb514692ceafb4f.zip | |
fix: when text is null, bug can pass validation.
fixed. (maybe?)
Diffstat (limited to 'src/server/api/endpoints/notes/create.ts')
| -rw-r--r-- | src/server/api/endpoints/notes/create.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/api/endpoints/notes/create.ts b/src/server/api/endpoints/notes/create.ts index 182359f637..89e72a184e 100644 --- a/src/server/api/endpoints/notes/create.ts +++ b/src/server/api/endpoints/notes/create.ts @@ -140,7 +140,7 @@ module.exports = (params, user: ILocalUser, app: IApp) => new Promise(async (res } // テキストが無いかつ添付ファイルが無いかつRenoteも無いかつ投票も無かったらエラー - if (text === undefined && files === null && renote === null && poll === undefined) { + if ((text === undefined or text === null) && files === null && renote === null && poll === undefined) { return rej('text, mediaIds, renoteId or poll is required'); } |