-
Notifications
You must be signed in to change notification settings - Fork 4
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
부산대_8조_위키키_8,9주차 #50
base: review
Are you sure you want to change the base?
부산대_8조_위키키_8,9주차 #50
Conversation
- Tree 형식으로 구현된 List<Post>를 입력받아 DFS로 목차를 생성하는 IndexUtils 구현하였습니다.
- 페이지 ID를 입력받아 특정 페이지들의 Post들을 조회하는 API 구현하였습니다.
- 페이지에 Post 생성시 History도 생성되도록 구현하였습니다. - Post 생성시 Page의 updated_at 수정되도록 구현하였습니다.
- 기존 Post에 있는 내용들과 동일하면 Exception을 던져주도록 구현하였습니다. - Post의 내용이 변경되면 History 테이블에 저장되도록 구현하였습니다.
- 페이지 조회 시 기존 1-1-1 방식에서 1.1.1로 수정
- 최근 생성/변경이 있는 10개의 페이지만 조회하도록 구현하였습니다. - 현재 group쪽은 연결이 안되어 있어서 where문에 groupId는 추후에 추가할 예정입니다.
- 이미 존재하는 Title의 페이지 생성시 예외 처리 - 추후에 where 문에 groupId 추가할 예정
- 해당 페이지에 post가 존재하는지 확인하고 존재하면 ApplicationException을 던지도록 구현하였습니다. - post가 존재안하는 페이지만 삭제 가능하도록 구현하였습니다.
- groupId랑 title을 가지고 특정 그룹에 존재하는 title의 페이지를 조회할 수 있는 API 구현하였습니다.
- 글 작성시 단어에 링크를 걸기 위한 PageId 조회하는 API 구현하였습니다.
- Post 삭제 시에 해당 Post의 Id를 가진 history 객체들도 모두 삭제시켜주었습니다 - Post들이 한 페이지내에서 트리 구조로 이루어져있어서 child Post를 가지고 있지 않는 Post들만 삭제가능하도록 예외처리하였습니다. - Post들 사이에 순서가 존재하므로 중간 순서의 Post가 삭제되었을 때, 뒷 순서의 Post들의 orders를 -1 처리해주었습니다.
- pull 이후 error 패키지 안 오류 수정 - MemberId Long으로 변경 - jwt 토큰 안의 getName을 email이 아닌 id로 수정
배포를 위한 에러 해결
…eam8_BE into donwoo � Conflicts: � wekiki/src/main/java/com/kakao/techcampus/wekiki/history/History.java
- 프론트팀원의 요청으로 페이지 목차 조회 API 추가하였습니다.
- pageName이랑 title을 혼동해서 쓰는 경우가 있어서 모두 pageName으로 통일하였습니다.
- 프론트 팀원의 요청으로 페이지 제목으로 페이지 조회 api에서 response에 pageId도 추가해주었습니다.
- 특정 post의 히스토리 조회 기능을 구현하였습니다. - 페이지네이션을 적용하여 5개씩 response에 담았습니다.
- 페이지 키워드에 검색에서 페이지의 가장 위에 있는 post의 내용을 responseDTO의 content에 추가하였습니다. - post가 하나도 존재하지 않는 페이지는 빈 문자열을 반환해줍니다.
- PageRestController에서 RequestMapping에 "/group/{groupid}/page"로 수정하였습니다. - PostRestController에서 RequestMapping에 "/group/{groupid}/post"로 수정하였습니다.
- 초대 링크 식별 후 GroupId 반환 - 휘발시킬지 말지 고민 중
- 특정 post에 댓글을 달 수 있도록 구현하였습니다 - 특정 post에 달려있는 댓글들을 최신 순으로 10개씩 페이지네이션으로 조회가능하도록 구현하였습니다.
- 특정 댓글을 댓글의 주인만 수정, 삭제가능하도록 구현하였습니다. - 수정시에 기존 댓글이랑 동일한 데이터가 일때 예외처리 하였습니다.
- CORS 문제를 해결하기 위한 Filter 추가. - 현재는 모든 url에 대해 열어두었습니다.
CORS 설정을 위한 파일 추가
- 비공식 비공개 그룹 초대 링크 확인 기능 구현
- 기존 페이지와 관련된 API 구축할 때, Member랑 Group 관련 로직을 제외하고 구현했는데 추가해주었습니다. - 모든 API에서 요청을 보낸 유저가 해당 그룹에 속한 유저가 맞는지 확인합니다.
- 기존 글과 관련된 API 구축할 때, Member랑 Group 관련 로직을 제외하고 구현했는데 추가해주었습니다. - 모든 글 관련 API에서 요청을 보낸 유저가 해당 그룹에 속한 유저가 맞는지 확인합니다.
- 기존 댓글과 관련된 API 구축할 때, Member랑 Group 관련 로직을 제외하고 구현했는데 추가해주었습니다. - 모든 댓글 관련 API에서 요청을 보낸 유저가 해당 그룹에 속한 유저가 맞는지 확인합니다.
- 그룹 삭제 시 오류 해결
- 그룹 삭제 수정
- 사용하지 않는 import문 삭제
- Group 내부 안쓰는 메소드 삭제 - GroupService 내부 리팩토링
[10주차] 로깅 전략 추가
- 최종 배포를 위한 설정 파일 수정하였습니다
setting : 배포 설정 파일 수정
- 최종 배포를 위한 설정 파일 수정하였습니다
setting : 배포 설정 파일 수정 (secret.yaml)
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.
미완성된 코드가 발견되었지만 멘토링을 통해서 이미 구현됨을 확인하여 간단히 리뷰하였습니다.
최종 평가로 구현된 부분확인하겠습니다.
|
||
@Component | ||
@Order(Ordered.HIGHEST_PRECEDENCE) | ||
public class CORSFilter implements Filter { |
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.
CORS 필터 잘 작성되었습니다. 👍
import org.springframework.security.core.context.SecurityContextHolder; | ||
|
||
public class SecurityUtils { | ||
|
||
public static String currentMember() { | ||
return SecurityContextHolder.getContext().getAuthentication().getName(); | ||
public static Long currentMember() { |
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.
예외처리가 꼼꼼하게 작성되었습니다.
public CommentResponse.getCommentDTO getComment(Long memberId, Long groupId, Long postId, int pageNo){ | ||
|
||
// 1. 존재하는 Member, Group, GroupMember 인지 fetch join으로 하나의 쿼리로 확인 | ||
ActiveGroupMember activeGroupMember = checkGroupMember(memberId, groupId); |
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.
fetch join으로 잘 구현되었습니다.
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long id; | ||
@ManyToOne | ||
@ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.PERSIST) |
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.
👍
redisInvitation : groupId로 Invitation 저장 | ||
redisGroupId : invitation.code로 groupId 저장 | ||
*/ | ||
if(invitation == null) { |
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.
초대링크를 Redis를 활용하여 잘 작성되었네요 👍
} | ||
|
||
public MemberResponse.authTokenDTO getKakaoInfo(String code) { | ||
//리팩토링 대상...!! |
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.
추후 리팩토링됨을 확인했습니다.
[최종] 최종 에러 핸들링
- 부산대 그룹 이메일 인증 시 가입 권한 설정 - 그룹 내 중복 닉네임 검사 수정
Update README.md
[10주차] 배포 전 수정
[최종] 8-week -> develop 병합
[최종] develop -> main 병합
Junhee 리드미 작성 끝
- INUK ReadMe 파일 수정 완료
Refactor: ReadMe 파일 수정
프로젝트 구조도 추가
- 황인욱 마지막 README 수정
Docs: README.md 수정
⭐Key Changes
👪멘토님께
이전 코드랑 충돌나서 일단 7주차 pull request close하고 새로 날렸습니다!!