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

템플릿 CRUD에 태그 및 카테고리 추가, 카테고리 CRUD #252

Merged
merged 75 commits into from
Aug 6, 2024

Conversation

HoeSeong123
Copy link
Contributor

⚡️ 관련 이슈

close #191, #250, #251

📍주요 변경 사항

  1. �템플릿 CRUD에 태그 및 카테고리 정보를 추가하여 처리한다.
  2. 카테고리 CRUD 기능 구현
  3. 위 기능들에 대한 Swagger 문서 최신화
  4. cors 헤더 열람 권한 추가

🎸기타

  1. null이 아닌 빈 값이 들어오는 경우에 대한 예외처리가 진행되어야 합니다.

HoeSeong123 and others added 30 commits July 30, 2024 16:32
- 존재하고 있습니다 -> 존재합니다 로 변경
- 응답에 중복된 이름에 대한 예외 추가
jminkkk
jminkkk previously approved these changes Aug 5, 2024
Copy link
Contributor

@jminkkk jminkkk left a comment

Choose a reason for hiding this comment

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

안녕하세요 초롱~
구현 잘 해주셨네요 짱!

당장은 크게 수정해야할 부분은 없는 것 같아요!~
코멘트 확인해주시고 이슈 생성 해주시면 좋을 것 같슴다!

zangsu
zangsu previously approved these changes Aug 5, 2024
Copy link
Contributor

@zangsu zangsu left a comment

Choose a reason for hiding this comment

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

변경사항 확인했습니다!
너무 고생 많았어요, 초롱!!!

Copy link
Contributor

@kyum-q kyum-q left a comment

Choose a reason for hiding this comment

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

수고하셨습니다 초롱 👍🍭🍬🐤

kyum-q
kyum-q previously approved these changes Aug 5, 2024
Copy link
Contributor

@zeus6768 zeus6768 left a comment

Choose a reason for hiding this comment

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

초롱 작업하느라 고생많았어요~ 코멘트 남겼으니 편하게 의견 나눠봐요!

import codezap.global.validation.ValidationGroups.SizeCheckGroup;
import io.swagger.v3.oas.annotations.media.Schema;

public record UpdateCategoryRequest(
Copy link
Contributor

Choose a reason for hiding this comment

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

저는 가짜중복이라고 생각해요 :)

@Service
public class CategoryService {

public static final int DEFAULT_CATEGORY = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
public static final int DEFAULT_CATEGORY = 1;
private static final long DEFAULT_CATEGORY_ID = 1;

Copy link
Contributor

Choose a reason for hiding this comment

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

변수명 변경은 안 한 이유가 궁금해요~!

backend/src/main/java/codezap/template/domain/Snippet.java Outdated Show resolved Hide resolved
jminkkk
jminkkk previously approved these changes Aug 5, 2024
Copy link
Contributor

@jminkkk jminkkk left a comment

Choose a reason for hiding this comment

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

초롱 리뷰 사항 잘 반영된 것 같네요~ 🔥

마지막 코멘트일 것 같아서 여기에 남겨요
초롱도 느끼고 있겠지만 다음 pr에는 pr 단위를 좀 더 쪼개보면 좋을 것 같슴다...ㅎㅎ
수고했어요!!!!!!!!!!!!!!!!

Comment on lines 52 to 59
public void deleteById(Long id) {
if (templateRepository.existsByCategoryId(id)) {
throw new CodeZapException(HttpStatus.BAD_REQUEST, "템플릿이 존재하는 카테고리는 삭제할 수 없습니다.");
}
if (id == DEFAULT_CATEGORY) {
throw new CodeZapException(HttpStatus.BAD_REQUEST, "기본 카테고리는 삭제할 수 없습니다.");
}
categoryRepository.deleteById(id);
Copy link
Contributor

Choose a reason for hiding this comment

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

[넘어가도 됩니다] if 문을 따로 메서드로 빼도 좋을 것 같아요.

@HoeSeong123 HoeSeong123 dismissed stale reviews from jminkkk, kyum-q, and zangsu via d125035 August 5, 2024 12:51
Copy link
Contributor

@kyum-q kyum-q left a comment

Choose a reason for hiding this comment

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

수고하셨습니다 초롱 ~

Copy link
Contributor

@zeus6768 zeus6768 left a comment

Choose a reason for hiding this comment

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

고생많았어요!

@HoeSeong123 HoeSeong123 merged commit 0dba693 into dev/be Aug 6, 2024
1 check failed
@zeus6768 zeus6768 deleted the feat/domain_update branch August 12, 2024 05:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BE 백엔드 feature 기능 추가 zap 리뷰 우선순위가 높은 사항
Projects
Status: Weekend Done
Development

Successfully merging this pull request may close these issues.

5 participants