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][#25] 카드 메모 api, 카드 api 수정 #33

Merged
merged 11 commits into from
Aug 6, 2024
Merged

Conversation

JeongSangByuk
Copy link
Collaborator

🌱 관련 이슈

📌 작업 내용 및 특이사항

  • Card API 수정
  • Card Memo API

📝 참고사항

  • n/a

📚 기타

  • n/a

return ResponseEntity.ok().body(null);
}

@DeleteMapping("/{card-id}/card-momo/{card-memo-id}")
Copy link
Member

Choose a reason for hiding this comment

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

card-momo 오타났습니다.

String updatedDate
) {

public static CardMemoGetResponse of(CardMemo cardMemo) {
Copy link
Member

Choose a reason for hiding this comment

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

파라미터 하나면 이름이 from이 좋을 것 같습니다

String type
) {

public static TagGetResponse of(Tag tag) {
Copy link
Member

Choose a reason for hiding this comment

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

from이 좋을 것 같습니다

@@ -29,6 +29,15 @@ public class CardMemo extends BaseEntity {
@JoinColumn(name = "card_id")
private Card card;

public CardMemo(Card card, String content) {
Copy link
Member

Choose a reason for hiding this comment

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

생성자가 왜 두개인가용?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

오타이슈ㅠㅠ


Card card = cardRepository.findByIdAndUser(cardId, user)
Copy link
Member

Choose a reason for hiding this comment

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

cardId만 있어도 찾을 수 있지 않나요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

카드 소유자 확인건으로 기검토 완료건입니답~

return new CardMemoCreateResponse(cardMemo.getId(), cardMemo.getContent());
}

public void updateCardMemo(User user, CardMemoContentUpdateRequest request, Long cardId, Long cardMemoId) {
Copy link
Member

Choose a reason for hiding this comment

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

@Transcational 붙여야할 것 같습니다

cardMemoRepository.save(cardMemo);
}

public void deleteCardMemo(User user, Long cardId, Long cardMemoId) {
Copy link
Member

Choose a reason for hiding this comment

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

@Transcational 붙여야할 것 같습니다

}

@Transactional
public void addCardTag(User user, Long cardId, Long tagId) {
Copy link
Member

Choose a reason for hiding this comment

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

addTagToCard가 좋을 것 같음

.toList();
}

public List<TagGetResponse> getCardTagList(User user, Long cardId) {
Copy link
Member

Choose a reason for hiding this comment

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

getTagListInCard 가 좋을 것 같습니다

}

@Transactional
public void deleteCardTag(User user, Long cardId, Long tagId) {
Copy link
Member

Choose a reason for hiding this comment

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

deleteTagToCard가 좋을것 같습니다

@JeongSangByuk JeongSangByuk changed the title Feature/#25 카드 메모 api, 카드 api 수정 [Feature][#25] 카드 메모 api, 카드 api 수정 Aug 5, 2024
@sejoon00 sejoon00 merged commit 8fbe954 into main Aug 6, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

✨ Card Memo API 신규 생성
2 participants