migration to GridFS's DriveFile

This commit is contained in:
otofune
2017-11-06 15:18:45 +09:00
parent 7e81e0db6a
commit 18b1ef29ad
11 changed files with 66 additions and 70 deletions

View File

@@ -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) {