-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: 사용자용 요청 주제(토픽) 생성/조회 API 구현 #318
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.
토픽 관련 API 수고하셨어여!! 단순 CRUD 느낌이라 저희 하던대로 잘 하셔서 볼 건 많이 없었는데 다만 한가지 페이지네이션 부분 코맨트 남겼으니 판단하시고 merge 하시면 될 거 같아요ㅎㅎ
일단 빨리 10시까지 PR 되어야하니 Approve 해놓을게요!
private final String code; | ||
private final String viewName; | ||
|
||
public static CategoryType codeOf(String code) { | ||
return Arrays.stream(CategoryType.values()) | ||
.filter(t -> t.getCode().equals(code)) | ||
.findAny() | ||
.orElseThrow(() -> new CustomException(RESOURCE_NOT_FOUND, "해당 카테고리코드는 존재하지 않습니다.")); | ||
.orElseThrow(() -> new CustomException(RESOURCE_NOT_FOUND, ERROR_MESSAGE + 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.
👍🏻
} | ||
Long cursorId = topics.get(topics.size() - 1).getId(); | ||
List<TopicDto> topicDtos = TopicDto.toList(topics); | ||
|
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.
이거 PaginationUtils.checkEndPage 메서드를 사용해도 될 거 같은데 대부분 cursorId 페이지네이션은 이 방식으로 쓰고 있어서 만약 통일성을 추구하고 싶으면 이거대로 하고 굳이면 동호님이 하신대로 하셔도 됩니다.!
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.
추후 리팩터링하는걸로 해볼게요 !!
Description
사용자용 요청 주제(토픽) 생성/조회 API를 구현했습니다~
Relation Issues