mirror of
https://github.com/sim1222/misskey.git
synced 2025-08-07 01:04:03 +09:00
[]API Fix bugs
This commit is contained in:
@ -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');
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user