[API] Fix bugs

This commit is contained in:
syuilo
2017-01-20 17:38:05 +09:00
parent 88e5a18509
commit e31eec542f
5 changed files with 5 additions and 15 deletions

View File

@@ -43,14 +43,12 @@ module.exports = (params, user) =>
}
// Create favorite
const inserted = await Favorite.insert({
await Favorite.insert({
created_at: new Date(),
post_id: post._id,
user_id: user._id
});
const favorite = inserted.ops[0];
// Send response
res();
});