From d05bf07b3f4165fc46bf6e2aa80e2f3448bac84f Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 28 Mar 2018 19:09:42 +0900 Subject: [PATCH] Fix bug --- src/api/endpoints/posts/favorites/delete.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/endpoints/posts/favorites/delete.ts b/src/api/endpoints/posts/favorites/delete.ts index b1b4fcebc..db52036ec 100644 --- a/src/api/endpoints/posts/favorites/delete.ts +++ b/src/api/endpoints/posts/favorites/delete.ts @@ -37,7 +37,7 @@ module.exports = (params, user) => new Promise(async (res, rej) => { } // Delete favorite - await Favorite.deleteOne({ + await Favorite.remove({ _id: exist._id });