[API] Fix bug

This commit is contained in:
syuilo 2017-02-09 01:37:50 +09:00
parent f6353ef677
commit bb2a10db18
3 changed files with 9 additions and 3 deletions

View File

@ -76,7 +76,9 @@ module.exports = (params, user) =>
}
}
DriveFile.update(file._id, file);
DriveFile.update(file._id, {
$set: file
});
// Serialize
const fileObj = await serialize(file);

View File

@ -99,7 +99,9 @@ module.exports = (params, user) =>
}
// Update
DriveFolder.update(folder._id, folder);
DriveFolder.update(folder._id, {
$set: folder
});
// Serialize
const folderObj = await serialize(folder);

View File

@ -78,7 +78,9 @@ module.exports = async (params, user, _, isSecure) =>
user.banner_id = new mongo.ObjectID(banner);
}
await User.update(user._id, user);
await User.update(user._id, {
$set: user
});
// Serialize
const iObj = await serialize(user, user, {