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

feat: 사용자용 요청 주제(토픽) 생성/조회 API 구현 #318

Merged
merged 4 commits into from
Oct 27, 2024

Conversation

kdkdhoho
Copy link
Collaborator

Description

사용자용 요청 주제(토픽) 생성/조회 API를 구현했습니다~

Relation Issues

@kdkdhoho kdkdhoho self-assigned this Oct 26, 2024
@kdkdhoho kdkdhoho requested a review from pparkjs as a code owner October 26, 2024 08:41
@kdkdhoho kdkdhoho linked an issue Oct 26, 2024 that may be closed by this pull request
2 tasks
Copy link
Collaborator

@pparkjs pparkjs left a 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));
Copy link
Collaborator

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);

Copy link
Collaborator

Choose a reason for hiding this comment

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

이거 PaginationUtils.checkEndPage 메서드를 사용해도 될 거 같은데 대부분 cursorId 페이지네이션은 이 방식으로 쓰고 있어서 만약 통일성을 추구하고 싶으면 이거대로 하고 굳이면 동호님이 하신대로 하셔도 됩니다.!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

추후 리팩터링하는걸로 해볼게요 !!

@kdkdhoho kdkdhoho merged commit 53b0b08 into dev Oct 27, 2024
1 check passed
@kdkdhoho kdkdhoho deleted the feat/306 branch October 27, 2024 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

사용자용 요청 주제 생성 및 조회 API
2 participants