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

[BE] 레이블 수정 기능 #120

Merged
merged 2 commits into from
Aug 10, 2023
Merged

[BE] 레이블 수정 기능 #120

merged 2 commits into from
Aug 10, 2023

Conversation

pie2457
Copy link

@pie2457 pie2457 commented Aug 9, 2023

Issues

What is this PR? 👓

레이블 수정 기능에 대한 PR입니다.

Key changes 🔑

  • 레이블 수정 기능
  • 수정된 레이블 이름, 폰트 색상, 배경 색상에 null 값이 들어갈 수 없도록 validation 추가
  • 레이블 수정 테스트 코드 추가

To reviewers 👋

레이블 생성 기능에 fontColor를 frontColor로 작성했었네요 아무도 못찾은건 유머입니다.~ 깔깔
오타도 같이 봐주시면 감사하겠습니다 👍🏼

@pie2457 pie2457 added enhancement New feature or request back-end labels Aug 9, 2023
@pie2457 pie2457 added this to the [BE] Sprint #3 milestone Aug 9, 2023
@pie2457 pie2457 self-assigned this Aug 9, 2023
Copy link

@23Yong 23Yong left a comment

Choose a reason for hiding this comment

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

수고하셨습니다~

@Transactional
public void modify(Integer labelId, String name, String description, String fontColor, String backgroundColor) {
Label label = new Label(labelId, name, description, fontColor, backgroundColor);
labelRepository.update(label);
Copy link

Choose a reason for hiding this comment

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

바로 업데이트 좋네요

Copy link
Collaborator

Choose a reason for hiding this comment

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

음.. 저는 labelId가 존재하지 않는 경우에도 정상적으로 업데이트가 된것처럼 응답이 되는거 같아서 한번 체크해주는 것도 좋을 것 같습니다!

Copy link
Author

Choose a reason for hiding this comment

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

확인해보니 mysql에서 labelId가 존재하지 않아도 에러가 발생하진 않는데 그래도 한번 더 체크할까요?!

() -> assertThat(result.get(0).getLabelName()).isEqualTo("after"),
() -> assertThat(result.get(0).getFontColor()).isEqualTo("black"),
() -> assertThat(result.get(0).getBackgroundColor()).isEqualTo("1111"));

Copy link

Choose a reason for hiding this comment

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

48라인 공백 지워주세용

Copy link

@HyowonSin HyowonSin 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
Collaborator

@tjdqls1200 tjdqls1200 left a comment

Choose a reason for hiding this comment

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

코드 잘 봤습니다! 수고하셨습니다~

@Transactional
public void modify(Integer labelId, String name, String description, String fontColor, String backgroundColor) {
Label label = new Label(labelId, name, description, fontColor, backgroundColor);
labelRepository.update(label);
Copy link
Collaborator

Choose a reason for hiding this comment

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

음.. 저는 labelId가 존재하지 않는 경우에도 정상적으로 업데이트가 된것처럼 응답이 되는거 같아서 한번 체크해주는 것도 좋을 것 같습니다!

@23Yong 23Yong linked an issue Aug 10, 2023 that may be closed by this pull request
3 tasks
@pie2457 pie2457 merged commit 1d72fbb into be-w3 Aug 10, 2023
1 check passed
@pie2457 pie2457 deleted the be/feature/#118-modify_label branch August 10, 2023 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
back-end enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BE] Label 수정
4 participants