Skip to content

Commit

Permalink
Merge pull request #33 from mash-up-kr/feature/fix-get-meme
Browse files Browse the repository at this point in the history
모두 plain object로 변환해서 넘기기
  • Loading branch information
seohyun0120 authored Jul 17, 2024
2 parents 4031aab + ea0ba9e commit 1c8f16b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/service/meme.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ async function getTodayMemeList(
const todayMemeList = await MemeModel.find(
{ isDeleted: false, isTodayMeme: true },
{ isDeleted: 0 },
);
).lean();

const memeList = await getMemeListWithKeywordsAndisSaved(user, todayMemeList);

Expand Down Expand Up @@ -87,7 +87,8 @@ async function getAllMemeList(
const memeList = await MemeModel.find({ isDeleted: false }, { isDeleted: 0 })
.skip((page - 1) * size)
.limit(size)
.sort({ createdAt: -1 });
.sort({ createdAt: -1 })
.lean();

const allMemeList = await getMemeListWithKeywordsAndisSaved(user, memeList);

Expand Down

0 comments on commit 1c8f16b

Please sign in to comment.