From f9da4a7d92de973a9d40f05502bcb5338a427c03 Mon Sep 17 00:00:00 2001 From: minjman2659 Date: Sat, 28 Aug 2021 17:53:08 +0900 Subject: [PATCH] =?UTF-8?q?[Server]=20contents.js=20:=20=EC=83=88=EA=B8=80?= =?UTF-8?q?=20=EC=9E=91=EC=84=B1=20=EA=B8=B0=EB=8A=A5=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/controllers/contents/contents.js | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/server/controllers/contents/contents.js b/server/controllers/contents/contents.js index 1b612c9..b24fb01 100644 --- a/server/controllers/contents/contents.js +++ b/server/controllers/contents/contents.js @@ -21,12 +21,8 @@ module.exports = { }) .then((newContent) => { console.log(newContent.dataValues); - return thumbs.create({ - user_Id: userId, - content_Id: newContent.dataValues.id, - }); + res.status(200).json({ message: "ok" }); }) - .then(() => res.status(200).json({ message: "ok" })) .catch((err) => console.log(err)); } else { // accessToken이 만료되어서 refreshToken을 판별하고, @@ -47,17 +43,11 @@ module.exports = { }) .then((newContent) => { console.log(newContent.dataValues); - return thumbs.create({ - user_Id: userId, - content_Id: newContent.dataValues.id, - }); - }) - .then(() => res.status(201).json({ accessToken: accessToken, message: "ok", - }) - ) + }); + }) .catch((err) => console.log(err)); } else { // accessToken이 만료되어서 refreshToken을 판별하고,