Skip to content
Snippets Groups Projects
Commit ce0cfbdf authored by syuilo⭐️'s avatar syuilo⭐️ Committed by GitHub
Browse files

[API] Fix bug

parent dc5b5aa7
No related branches found
No related tags found
No related merge requests found
......@@ -243,7 +243,7 @@ module.exports = (params, user, app) =>
// 投稿を作成
const post = await Post.insert({
created_at: new Date(),
media_ids: media ? files.map(file => file._id) : undefined,
media_ids: files.length > 0 ? files.map(file => file._id) : undefined,
reply_to_id: replyTo ? replyTo._id : undefined,
repost_id: repost ? repost._id : undefined,
poll: poll ? poll : undefined,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment