FIX
This commit is contained in:
@@ -43,7 +43,7 @@ public class StockServiceImpl implements StockService{
|
||||
|
||||
@Override
|
||||
public Stock findByRef(String ref) {
|
||||
Stock stock = stockRepository.findByRefEQ(ref);
|
||||
Stock stock = stockRepository.findByRef(ref);
|
||||
if (stock == null) {
|
||||
throw new EntityNotFoundException("Ref non valide");
|
||||
}
|
||||
|
||||
@@ -9,5 +9,5 @@ import java.util.List;
|
||||
@Repository
|
||||
public interface StockRepository extends MongoRepository<Stock,Long> {
|
||||
List<Stock> findByNameIsContainingIgnoreCaseAndIsRentFalse(String name);
|
||||
Stock findByRefEQ(String ref);
|
||||
Stock findByRef(String ref);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user