Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ public class AllFoodListResponse {
private String foodCategory;
private LocalDate expirationDate;
private long daysLeft;
private String storageMethod;
}
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ public List<AllFoodListResponse> getAllFoodsWithDday(Long userId) {
long daysLeft = expiration != null
? ChronoUnit.DAYS.between(LocalDate.now(), expiration)
: -1;
return new AllFoodListResponse(id, name, category, expiration, daysLeft);
String storageMethod = foodRegister.getStorageMethod();
return new AllFoodListResponse(id, name, category, expiration, daysLeft, storageMethod);
})
.toList();
}
Expand Down Expand Up @@ -164,7 +165,8 @@ public List<AllFoodListResponse> getFilteredFoods(Long userId, String storageMet
long daysLeft = expiration != null
? ChronoUnit.DAYS.between(LocalDate.now(), expiration)
: -1;
return new AllFoodListResponse(id, name, category, expiration, daysLeft);
String method = fr.getStorageMethod();
return new AllFoodListResponse(id, name, category, expiration, daysLeft,method);
})
.toList();
}
Expand Down