diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2018-06-08 22:04:22 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-06-08 22:04:22 +0900 |
| commit | 726d5a177efb0fa019f120b1713c8166e9a61aa6 (patch) | |
| tree | eb267cac211a43518461c5c1d4103758a2172642 /src/server | |
| parent | 2.33.2 (diff) | |
| parent | fix: "or" operator. (diff) | |
| download | sharkey-726d5a177efb0fa019f120b1713c8166e9a61aa6.tar.gz sharkey-726d5a177efb0fa019f120b1713c8166e9a61aa6.tar.bz2 sharkey-726d5a177efb0fa019f120b1713c8166e9a61aa6.zip | |
Merge pull request #1685 from 2vg/patch-1
fix: when text is null, bug can pass validation.
Diffstat (limited to 'src/server')
| -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..446764e1d6 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 || text === null) && files === null && renote === null && poll === undefined) { return rej('text, mediaIds, renoteId or poll is required'); } |