summaryrefslogtreecommitdiff
path: root/src/api/endpoints/posts/create.ts
diff options
context:
space:
mode:
authorotofune <otofune@gmail.com>2017-11-06 15:18:45 +0900
committerotofune <otofune@gmail.com>2017-11-06 15:18:45 +0900
commit18b1ef29adc6166c2b1a327b378c3e159a18b80c (patch)
tree7d8f0b8d09d687856e22c0d6d84dbd18b50b6e7a /src/api/endpoints/posts/create.ts
parentsupport GridFS (diff)
downloadsharkey-18b1ef29adc6166c2b1a327b378c3e159a18b80c.tar.gz
sharkey-18b1ef29adc6166c2b1a327b378c3e159a18b80c.tar.bz2
sharkey-18b1ef29adc6166c2b1a327b378c3e159a18b80c.zip
migration to GridFS's DriveFile
Diffstat (limited to 'src/api/endpoints/posts/create.ts')
-rw-r--r--src/api/endpoints/posts/create.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/api/endpoints/posts/create.ts b/src/api/endpoints/posts/create.ts
index f982b9ee93..1507639776 100644
--- a/src/api/endpoints/posts/create.ts
+++ b/src/api/endpoints/posts/create.ts
@@ -44,9 +44,9 @@ module.exports = (params, user: IUser, app) => new Promise(async (res, rej) => {
// SELECT _id
const entity = await DriveFile.findOne({
_id: mediaId,
- user_id: user._id
- }, {
- _id: true
+ metadata: {
+ user_id: user._id
+ }
});
if (entity === null) {