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

[Feature] - 태그 생성 및 조회 API 작성 #238

Merged
merged 11 commits into from
Aug 7, 2024
Merged

Conversation

eunjungL
Copy link

@eunjungL eunjungL commented Aug 7, 2024

✅ 작업 내용

  • 태그 Entity 생성
  • 태그 생성 API
  • 태그 조회 API

@eunjungL eunjungL added the BE label Aug 7, 2024
@eunjungL eunjungL added this to the sprint 3 milestone Aug 7, 2024
@eunjungL eunjungL self-assigned this Aug 7, 2024
Copy link

github-actions bot commented Aug 7, 2024

Test Results

 27 files   27 suites   5s ⏱️
186 tests 186 ✅ 0 💤 0 ❌
195 runs  195 ✅ 0 💤 0 ❌

Results for commit c690b91.

♻️ This comment has been updated with latest results.

@eunjungL eunjungL linked an issue Aug 7, 2024 that may be closed by this pull request
3 tasks
Copy link

@hangillee hangillee left a comment

Choose a reason for hiding this comment

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

문제 없어보입니다! 고생하셨어요 클로버~
Caffeine 라이브러리 선택 이유만 Tech Log에 적어주시면 감사하겠습니다!

Copy link
Member

@nak-honest nak-honest left a comment

Choose a reason for hiding this comment

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

바로 LGTM 박습니닷!
unique 만 해주시면 좋을 것 같아욥

@Transactional
public TagResponse createTag(TagCreateRequest tagCreateRequest) {
validateDuplicated(tagCreateRequest);
Tag savedTage = tagRepository.save(tagCreateRequest.toTag());
Copy link
Member

Choose a reason for hiding this comment

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

혹시 tage가 무엇인가요?

Copy link
Author

Choose a reason for hiding this comment

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

오타 수정하겠습니다!

Comment on lines +36 to +42
@Cacheable(cacheNames = "tag")
@Transactional(readOnly = true)
public List<TagResponse> readTags() {
return tagRepository.findAll().stream()
.map(TagResponse::from)
.toList();
}
Copy link
Member

Choose a reason for hiding this comment

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

로컬 캐시 좋네요. 고생하셨습니다.

Comment on lines 19 to 20
@Column(nullable = false)
private String tag;
Copy link
Member

Choose a reason for hiding this comment

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

어플리케이션 레벨에서 확인하고 있지만,
unique 제약 조건 달아도 좋을 것 같슴다.

Copy link
Author

Choose a reason for hiding this comment

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

좋은 제안입니다~! 👍 👍 바로 반영

Copy link

@slimsha2dy slimsha2dy left a comment

Choose a reason for hiding this comment

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

캐시가 인상적이네요. description에 사소한 실수가 있어 확인 부탁드립니다.
수고 많으셨습니다 클로버!

),
@ApiResponse(
responseCode = "400",
description = "Body에 유효하지 않은 값이 존재하지 않거나 중복된 태그가 존재할 때",

Choose a reason for hiding this comment

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

이 description 부분 수정 부탁드리겠습니다!

Copy link
Author

Choose a reason for hiding this comment

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

잘 잡아주셨군요 감사합니다^^_

eunjungL added a commit that referenced this pull request Aug 7, 2024
Copy link
Author

@eunjungL eunjungL left a comment

Choose a reason for hiding this comment

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

리뷰 반영 완료했습니다!

),
@ApiResponse(
responseCode = "400",
description = "Body에 유효하지 않은 값이 존재하지 않거나 중복된 태그가 존재할 때",
Copy link
Author

Choose a reason for hiding this comment

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

잘 잡아주셨군요 감사합니다^^_

Comment on lines 19 to 20
@Column(nullable = false)
private String tag;
Copy link
Author

Choose a reason for hiding this comment

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

좋은 제안입니다~! 👍 👍 바로 반영

@Transactional
public TagResponse createTag(TagCreateRequest tagCreateRequest) {
validateDuplicated(tagCreateRequest);
Tag savedTage = tagRepository.save(tagCreateRequest.toTag());
Copy link
Author

Choose a reason for hiding this comment

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

오타 수정하겠습니다!

@eunjungL eunjungL requested a review from slimsha2dy August 7, 2024 06:23
@eunjungL eunjungL merged commit d921741 into develop/be Aug 7, 2024
3 checks passed
@eunjungL eunjungL deleted the feature/be/#227 branch August 7, 2024 06:25
hangillee pushed a commit to hangillee/2024-touroot that referenced this pull request Aug 20, 2024
* feat: Tag Entity 추가

* feat: 태그 생성 구현

* docs: 태그 생성 Swagger 작성

* feat: 태그 조회 API

* fix: 태그 컨트롤러 url 수정

* feat: 태그 조회 API 캐싱 추가

* docs: 태그 생성 ApiResponse Operation description 수정

* feat: Tag Entity tag에 unqiue 제약 조건

* fix: createTag savedTag 오타 수정
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Feature] - 태그 생성 및 조회 API 작성
4 participants