Skip to content
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

Merged
merged 4 commits into from
Nov 19, 2024
Merged

Feature/#93 - 좋아요 기능 구현 #193

merged 4 commits into from
Nov 19, 2024

Conversation

xjfcnfw3
Copy link
Collaborator

close #93

✅ 작업 내용

  • 좋아요 엔티티 구현
  • 좋아요 기능 구현

😎 체크 사항

  • label 설정 확인
  • 브랜치 방향 확인

@xjfcnfw3 xjfcnfw3 added ✨feature 기능 개발 BE labels Nov 19, 2024
@xjfcnfw3 xjfcnfw3 requested a review from a team November 19, 2024 07:19
@xjfcnfw3 xjfcnfw3 self-assigned this Nov 19, 2024
Copy link
Collaborator

@baegyeong baegyeong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다!! 👍👍

Comment on lines 99 to 100
id: stock.id as string,
name: stock.name as string,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 부분 혹시 추론이 되진 않나요?

Copy link
Collaborator Author

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);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

console.log 가 있네요..!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

다음 PR에 제거해서 올리겠습니다!

@xjfcnfw3 xjfcnfw3 closed this Nov 19, 2024
@xjfcnfw3 xjfcnfw3 reopened this Nov 19, 2024
@xjfcnfw3 xjfcnfw3 closed this Nov 19, 2024
@xjfcnfw3 xjfcnfw3 reopened this Nov 19, 2024
@xjfcnfw3 xjfcnfw3 changed the base branch from dev to dev-be November 19, 2024 14:31
Copy link
Contributor

@demian-m00n demian-m00n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lego Disney - Glasses

Comment on lines +11 to +12
export function ToggleLikeApi() {
return applyDecorators(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

커스텀 데코레이터 설정 굿입니다.

Comment on lines +11 to +12

@Index('chat_user_unique', ['chat', 'user'], { unique: true })
Copy link
Contributor

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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

like 카운트를 더해주는 방향으로 구현하셨군요. 혹시 이 부분에 대해 정합성을 검사해주는 로직이 존재할까요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아마 주기적으로 스케줄링으로 좋아요 수를 맞출 예정입니다!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

락도 고민했었는데 성능 문제와 데드락의 위험성이 조금 있어서 제외했습니다! (아마 같은 사용자가 같은 게시물을 엄청 빠르게 토글하면 데드락이 발생할 가능성이 있습니다!)

@xjfcnfw3 xjfcnfw3 merged commit f0c72df into dev-be Nov 19, 2024
@xjfcnfw3 xjfcnfw3 deleted the feature/#93 branch November 25, 2024 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BE ✨feature 기능 개발
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] - 2.6 사용자는 좋아요를 클릭해서 "좋아요" 할 수 있다.
3 participants