-
Notifications
You must be signed in to change notification settings - Fork 8
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
Conversation
Co-authored-by: zangsu <[email protected]>
Co-authored-by: zangsu <[email protected]>
Co-authored-by: zangsu <[email protected]>
Co-authored-by: zangsu <[email protected]>
템플릿 생성 기능 리팩토링
- 존재하고 있습니다 -> 존재합니다 로 변경 - 응답에 중복된 이름에 대한 예외 추가
카테고리 기능 구현
Co-authored-by: zangsu <[email protected]>
Co-authored-by: zangsu <[email protected]>
Co-authored-by: zangsu <[email protected]>
Co-authored-by: zangsu <[email protected]>
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.
안녕하세요 초롱~
구현 잘 해주셨네요 짱!
당장은 크게 수정해야할 부분은 없는 것 같아요!~
코멘트 확인해주시고 이슈 생성 해주시면 좋을 것 같슴다!
backend/src/main/java/codezap/template/dto/request/CreateTemplateRequest.java
Outdated
Show resolved
Hide resolved
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.
변경사항 확인했습니다!
너무 고생 많았어요, 초롱!!!
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.
수고하셨습니다 초롱 👍🍭🍬🐤
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.
초롱 작업하느라 고생많았어요~ 코멘트 남겼으니 편하게 의견 나눠봐요!
backend/src/main/java/codezap/category/controller/CategoryController.java
Outdated
Show resolved
Hide resolved
import codezap.global.validation.ValidationGroups.SizeCheckGroup; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
|
||
public record UpdateCategoryRequest( |
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.
저는 가짜중복이라고 생각해요 :)
@Service | ||
public class CategoryService { | ||
|
||
public static final int DEFAULT_CATEGORY = 1; |
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 static final int DEFAULT_CATEGORY = 1; | |
private static final long DEFAULT_CATEGORY_ID = 1; |
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.
변수명 변경은 안 한 이유가 궁금해요~!
backend/src/main/java/codezap/template/service/TemplateService.java
Outdated
Show resolved
Hide resolved
backend/src/main/java/codezap/template/service/TemplateService.java
Outdated
Show resolved
Hide resolved
backend/src/main/java/codezap/template/service/TemplateService.java
Outdated
Show resolved
Hide resolved
backend/src/main/java/codezap/template/service/TemplateService.java
Outdated
Show resolved
Hide resolved
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.
초롱 리뷰 사항 잘 반영된 것 같네요~ 🔥
마지막 코멘트일 것 같아서 여기에 남겨요
초롱도 느끼고 있겠지만 다음 pr에는 pr 단위를 좀 더 쪼개보면 좋을 것 같슴다...ㅎㅎ
수고했어요!!!!!!!!!!!!!!!!
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); |
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.
[넘어가도 됩니다] if 문을 따로 메서드로 빼도 좋을 것 같아요.
d125035
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.
수고하셨습니다 초롱 ~
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.
고생많았어요!
⚡️ 관련 이슈
close #191, #250, #251
📍주요 변경 사항
🎸기타