From db525650c01ed349c3de7cf584ace58857fc1f53 Mon Sep 17 00:00:00 2001 From: effe Date: Sat, 14 Sep 2024 14:17:28 -0400 Subject: [PATCH] refactor: PersonService --- .../java/com/application/munera/services/PersonService.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/com/application/munera/services/PersonService.java b/src/main/java/com/application/munera/services/PersonService.java index 10cf6fe..bab9617 100644 --- a/src/main/java/com/application/munera/services/PersonService.java +++ b/src/main/java/com/application/munera/services/PersonService.java @@ -5,7 +5,6 @@ import com.application.munera.data.Person; import com.application.munera.data.User; import com.application.munera.repositories.ExpenseRepository; import com.application.munera.repositories.PersonRepository; -import com.application.munera.repositories.UserRepository; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.domain.Specification; @@ -13,7 +12,6 @@ import org.springframework.stereotype.Service; import java.math.BigDecimal; import java.util.List; -import java.util.Objects; import java.util.Optional; @Service @@ -32,7 +30,7 @@ public class PersonService { * @param id the ID of the person * @return an optional containing the person if found, otherwise empty */ - public Optional get(Long id) { + public Optional findById(Long id) { return personRepository.findById(id); }