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

✨ read comments of recipe #160

Merged
merged 4 commits into from
Aug 4, 2024
Merged

✨ read comments of recipe #160

merged 4 commits into from
Aug 4, 2024

Conversation

hyxrxn
Copy link
Contributor

@hyxrxn hyxrxn commented Aug 3, 2024

레시피의 아이디를 받아 댓글을 조회합니다.

이 때 로그인한 유저의 댓글인지를 확인할 수 있어야 삭제 버튼을 노출시킬 수 있어, mine이라는 필드가 존재합니다.
comment.getUser().getId() == userInfo.getId() 부분은 나중에 UserInfo로 옮기면 좋을 것 같네요!

Copy link

github-actions bot commented Aug 3, 2024

Overall Project 93.97% -0.14% 🍏
Files changed 97.27% 🍏

File Coverage
CommentController.java 100% 🍏
CommentService.java 100% 🍏
CommentResponse.java 100% 🍏
Comment.java 83.33% -16.67% 🍏

Copy link

@tackyu tackyu left a comment

Choose a reason for hiding this comment

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

아토 고생 많으셨습니다!!

import net.pengcook.recipe.domain.Recipe;
import net.pengcook.user.domain.User;

@Entity
Copy link

Choose a reason for hiding this comment

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

어노테이션으로 기본생성자 명시해도 괜찮을 것 같아요!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

지금은 다른 생성자가 없어서 알아서 만들어주니까 그냥 뒀는데,
생각해보니 어노테이션 이용해서 접근제한자 설정해도 괜찮겠네요!
수정하겠습니다

String message;

LocalDateTime createdAt;
}
Copy link

Choose a reason for hiding this comment

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

필드에 접근제어자 제거하신 이유가 궁금합니다!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

이런 어이없는 실수를...
확인 감사합니다!!!!!

Copy link
Contributor

@geoje geoje left a comment

Choose a reason for hiding this comment

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

깔끔하네요~ 주말인데도 작성하시느라 정말 고생 많았어요!!

import net.pengcook.authentication.domain.UserInfo;
import net.pengcook.comment.domain.Comment;

public record CommentResponse(
Copy link
Contributor

Choose a reason for hiding this comment

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

추후에 행위가 다르지만 도메인이 같은 DTO가 생길 수도 있으니 클래스명 변경으로 중복을 미리 방지하는 것은 어떤가요~?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

좋습니닷

@HaiSeong
Copy link

HaiSeong commented Aug 4, 2024

comment.getUser().getId() == userInfo.getId() 부분은 나중에 UserInfo로 옮기면 좋을 것 같네요!

긍정적으로 검토 해보겠습니다.

Copy link

github-actions bot commented Aug 4, 2024

Overall Project 93.97% -0.14% 🍏
Files changed 97.27% 🍏

File Coverage
CommentController.java 100% 🍏
CommentService.java 100% 🍏
CommentOfRecipeResponse.java 100% 🍏
Comment.java 83.33% -16.67% 🍏

@hyxrxn hyxrxn merged commit ee634f5 into be/dev Aug 4, 2024
1 check passed
@hyxrxn hyxrxn deleted the be/feat/138 branch August 4, 2024 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BE Backend ✨ feature new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants