-
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
Feature/#93 - 좋아요 기능 구현 #193
Conversation
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.
수고하셨습니다!! 👍👍
id: stock.id as string, | ||
name: stock.name as string, |
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.
이 부분 혹시 추론이 되진 않나요?
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.
현재 stock의 타입이 id와 name이 undefined도 포함되는 형태입니다. 일단 as로 타입을 string으로 두고 나중에 undefined를 제거할 예정입니다!
}) | ||
@Get() | ||
async searchStock(@Query() request: StockSearchRequest) { | ||
console.log(request.name); |
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.
console.log 가 있네요..!
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.
다음 PR에 제거해서 올리겠습니다!
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.
export function ToggleLikeApi() { | ||
return applyDecorators( |
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.
커스텀 데코레이터 설정 굿입니다.
|
||
@Index('chat_user_unique', ['chat', 'user'], { unique: true }) |
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.
인덱스 설정 굿입니다.
chat: Chat, | ||
userId: number, | ||
): Promise<LikeResponse> { | ||
chat.likeCount += 1; |
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.
like 카운트를 더해주는 방향으로 구현하셨군요. 혹시 이 부분에 대해 정합성을 검사해주는 로직이 존재할까요?
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.
아마 주기적으로 스케줄링으로 좋아요 수를 맞출 예정입니다!
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.
락도 고민했었는데 성능 문제와 데드락의 위험성이 조금 있어서 제외했습니다! (아마 같은 사용자가 같은 게시물을 엄청 빠르게 토글하면 데드락이 발생할 가능성이 있습니다!)
close #93
✅ 작업 내용
😎 체크 사항