Skip to content

Commit

Permalink
[fix] successCode 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryeolee committed Apr 13, 2024
1 parent 1d3b68a commit 914b0b6
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public BaseResponseDto<SelectDiaryOneResponse> selectDiaryOne(
MyVeggie myVeggie
) {
List<Diary> diaryList = selectDiaryByMyVeggie(myVeggie);
if(checkNullDiaryList(diaryList)) {
if(diaryList.isEmpty()) {
return BaseResponseDto.of(MyVeggieGardenSuccessCode.NOT_FOUND_DIARY, null);
}
return BaseResponseDto.of(SuccessCode.SUCCESS,
Expand All @@ -78,7 +78,6 @@ public BaseResponseDto<SelectDiaryOneResponse> selectDiaryOne(




public boolean verifyDiaryState(Diary diary){

if(diary == null){
Expand All @@ -87,13 +86,6 @@ public boolean verifyDiaryState(Diary diary){
return false;
}

public boolean checkNullDiaryList(List<Diary> diaries){

if(diaries.isEmpty()){
return true;
}
return false;
}

public Diary selectTodayDiary(MyVeggie myVeggie){
return myVeggieRepository.findDiariesByMyVeggieAndToday(myVeggie);
Expand Down

0 comments on commit 914b0b6

Please sign in to comment.