diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-03-06 03:50:27 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-03-06 03:50:27 +0900 |
| commit | 79c264171d69992ce76f4ceec2bd03b0e5faaac3 (patch) | |
| tree | 184d909156a10bb073376f3d89cd548648f48bda /src/api/endpoints/messaging/messages/create.ts | |
| parent | Merge pull request #235 from syuilo/greenkeeper/cafy-1.0.1 (diff) | |
| download | sharkey-79c264171d69992ce76f4ceec2bd03b0e5faaac3.tar.gz sharkey-79c264171d69992ce76f4ceec2bd03b0e5faaac3.tar.bz2 sharkey-79c264171d69992ce76f4ceec2bd03b0e5faaac3.zip | |
[]API Fix bugs
Diffstat (limited to 'src/api/endpoints/messaging/messages/create.ts')
| -rw-r--r-- | src/api/endpoints/messaging/messages/create.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/api/endpoints/messaging/messages/create.ts b/src/api/endpoints/messaging/messages/create.ts index a63e8b1959..dc3556da0d 100644 --- a/src/api/endpoints/messaging/messages/create.ts +++ b/src/api/endpoints/messaging/messages/create.ts @@ -51,7 +51,7 @@ module.exports = (params, user) => new Promise(async (res, rej) => { if (fileIdErr) return rej('invalid file_id param'); let file = null; - if (fileId !== null) { + if (fileId !== undefined) { file = await DriveFile.findOne({ _id: fileId, user_id: user._id @@ -65,7 +65,7 @@ module.exports = (params, user) => new Promise(async (res, rej) => { } // テキストが無いかつ添付ファイルも無かったらエラー - if (text === null && file === null) { + if (text === undefined && file === null) { return rej('text or file is required'); } |