-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
최신순으로 보여주게 수정 #59
최신순으로 보여주게 수정 #59
Conversation
src/controller/meme.controller.ts
Outdated
|
||
if (size > 5) { | ||
if (size > 20) { | ||
return next( | ||
new CustomError( | ||
`Invalid 'size' parameter. Today Meme List max size is 5.`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아예 로그도 바꿔버리자
Invalid 'size' parameter. Latest MemeList max size is 20.
src/controller/meme.controller.ts
Outdated
@@ -164,11 +164,11 @@ const getAllMemeList = async (req: CustomRequest, res: Response, next: NextFunct | |||
} | |||
}; | |||
|
|||
const getTodayMemeList = async (req: CustomRequest, res: Response, next: NextFunction) => { | |||
const getLatestMeme = async (req: CustomRequest, res: Response, next: NextFunction) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이것도 List 뒤에 붙여주세용
getLatestMemeList
src/service/meme.service.ts
Outdated
@@ -60,27 +60,27 @@ async function getMemeWithKeywords( | |||
} | |||
} | |||
|
|||
async function getTodayMemeList( | |||
async function getLatestCreatedMeme( | |||
limit: number = 5, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
기본값 20으로 바꿔주세욥
src/service/meme.service.ts
Outdated
{ isDeleted: false, isTodayMeme: true }, | ||
{ isDeleted: 0 }, | ||
).lean(); | ||
const latestMemeList = await MemeModel.find({ isDeleted: false }, { isDeleted: false }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
질문) 마지막 필드가 { isDeleted: false}
여도 돼? isDeleted field 제거하겠단거징?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아 잘못 봤다
최신순으로 보여주게 수정
recommend meme 함수 삭제 사용안해서