Skip to content

Commit

Permalink
Fix: weeklyPopularBrandList(getRanking) date(UTC) -> date(KST)
Browse files Browse the repository at this point in the history
  • Loading branch information
cuconveniencestore authored and hookor committed Aug 30, 2024
1 parent eee504d commit 8a2f7c0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions controllers/posts-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,9 @@ exports.getSocialCounts = async (req, res) => {
// 13. 메인 페이지 브랜드 순위 조회
exports.getRanking = async (req, res) => {
const result = await PostService.getRanking(req);
const date = new Date().getDate();
const postRes = { [Number(date)]: result };
const date = new Date();
const kstDate = new Date(date.getTime() + 9 * 60 * 60 * 1000).getDate();
const postRes = { [Number(kstDate)]: result };
return (
postRes &&
res.status(200).json({ data: postRes !== undefined ? postRes : null })
Expand Down

0 comments on commit 8a2f7c0

Please sign in to comment.