diff options
| author | Akihiko Odaki <nekomanma@pixiv.co.jp> | 2018-03-31 19:45:56 +0900 |
|---|---|---|
| committer | Akihiko Odaki <nekomanma@pixiv.co.jp> | 2018-03-31 20:17:16 +0900 |
| commit | 8c4143290735b39bc68bf98439b2735af1910518 (patch) | |
| tree | 60fdc5c605b063026654764977b9b1ab11ab6439 /src/server/api/endpoints/posts | |
| parent | デフォルトでドライブ容量は128MiBにした (diff) | |
| download | sharkey-8c4143290735b39bc68bf98439b2735af1910518.tar.gz sharkey-8c4143290735b39bc68bf98439b2735af1910518.tar.bz2 sharkey-8c4143290735b39bc68bf98439b2735af1910518.zip | |
Set empty array instead of null to mediaIds property of posts
Diffstat (limited to 'src/server/api/endpoints/posts')
| -rw-r--r-- | src/server/api/endpoints/posts/create.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/api/endpoints/posts/create.ts b/src/server/api/endpoints/posts/create.ts index 170b667191..aa7e93c28f 100644 --- a/src/server/api/endpoints/posts/create.ts +++ b/src/server/api/endpoints/posts/create.ts @@ -254,7 +254,7 @@ module.exports = (params, user: IUser, app) => new Promise(async (res, rej) => { createdAt: new Date(), channelId: channel ? channel._id : undefined, index: channel ? channel.index + 1 : undefined, - mediaIds: files ? files.map(file => file._id) : undefined, + mediaIds: files ? files.map(file => file._id) : [], replyId: reply ? reply._id : undefined, repostId: repost ? repost._id : undefined, poll: poll, |