Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

[Feat] RECORDING hsitory 직접 추가 방지 #42

Merged
merged 3 commits into from
Jan 25, 2024

Conversation

goldentrash
Copy link
Collaborator

개요

히스토리 추가 API를 통해 데일리 기록 히스토리 추가를 방지 (close #33)

Todo

  • PlantService 테스트 작성
  • PlantService.createHistoryRECORDING 직접 등록 방지하도록 변경

웃픈(?) 이야기

데일리 기록 히스토리 직접 추가는 곁가지고, 물줬을때 날짜 갱신이 메인인데, 이거 이미 구현되어있던 기능이네요
착각했던... ㅠ

image


등록 전 확인

  • 모든 test가 pass했나요?
  • 모든 code가 well-formatted인가요?
  • commit message는 직관적이었을까요?
  • 삭제해야 할, 주석처리 된 코드는 없을까요?

@goldentrash goldentrash self-assigned this Jan 25, 2024
@goldentrash goldentrash added the 🚀 기능 구현 🚀 기능 구현 label Jan 25, 2024
@@ -60,6 +60,9 @@ class PlantService(
val findMember = memberRepository.findByDeviceTokenOrThrow(deviceToken)
val findCompanionPlant = companionPlantRepository.findByIdAndMemberIdOrThrow(plantId, findMember.getId)

if (historyType == HistoryType.RECORDING)
Copy link
Member

@zbqmgldjfh zbqmgldjfh Jan 25, 2024

Choose a reason for hiding this comment

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

음! 객체지향적으로 조금만 더 생각해봅시다!! 토끼책 읽어줘여어어어!
추가로 if()문 뒤에 한줄 쓰더라고 {} 중괄호 사용하셔야 됩니다.
Google Java Guide Docs 참고해보시길

Copy link
Member

@zbqmgldjfh zbqmgldjfh left a comment

Choose a reason for hiding this comment

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

https://newwisdom.tistory.com/96 Java 스타일 가이드도 눈으로 한번 쓱 보면 도움 많이될거에요!!

@goldentrash goldentrash merged commit c0f885a into develop Jan 25, 2024
1 check passed
@goldentrash goldentrash deleted the feat/history-sideEffect-#33 branch January 25, 2024 11:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feat] WATER_CHANGE 히스토리 추가시 nextWaterDatelastWaterDate 갱신
2 participants