summaryrefslogtreecommitdiff
path: root/src/api
diff options
context:
space:
mode:
authorsyuilo⭐️ <Syuilotan@yahoo.co.jp>2017-01-20 17:23:37 +0900
committerGitHub <noreply@github.com>2017-01-20 17:23:37 +0900
commit21f1da39c67db70df31f658d5dee69ebe9434696 (patch)
tree11cb645b7438fdd1f4149da0c6bca880c6f057c6 /src/api
parentFix bug (diff)
downloadsharkey-21f1da39c67db70df31f658d5dee69ebe9434696.tar.gz
sharkey-21f1da39c67db70df31f658d5dee69ebe9434696.tar.bz2
sharkey-21f1da39c67db70df31f658d5dee69ebe9434696.zip
[API] Fix bug
Diffstat (limited to 'src/api')
-rw-r--r--src/api/endpoints/posts/likes/create.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/api/endpoints/posts/likes/create.js b/src/api/endpoints/posts/likes/create.js
index 73054be875..d148c99d41 100644
--- a/src/api/endpoints/posts/likes/create.js
+++ b/src/api/endpoints/posts/likes/create.js
@@ -54,14 +54,12 @@ module.exports = (params, user) =>
}
// Create like
- const inserted = await Like.insert({
+ await Like.insert({
created_at: new Date(),
post_id: post._id,
user_id: user._id
});
- const like = inserted.ops[0];
-
// Send response
res();