Skip to content

Commit

Permalink
Merge pull request #77 from minjman2659/dev
Browse files Browse the repository at this point in the history
[Server] / #22 / contents.js : 새글 작성 기능 수정
  • Loading branch information
minjman2659 authored Aug 28, 2021
2 parents 289b7dd + f9da4a7 commit c239434
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions server/controllers/contents/contents.js
Original file line number Diff line number Diff line change
Expand Up @@ -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을 판별하고,
Expand All @@ -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을 판별하고,
Expand Down

0 comments on commit c239434

Please sign in to comment.