Skip to content

Commit

Permalink
Service
Browse files Browse the repository at this point in the history
  • Loading branch information
adityakalambe01 committed Mar 15, 2024
1 parent 4516c4b commit f7b9ed2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/com/products/service/ProductService.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public boolean updateProduct(Long productId, Product updatedProduct) {
* Add Default Products
*
* */
public void addDefaultProducts(){
public String addDefaultProducts(){
List<Categories> allCategories = new LinkedList<>(categoryRepository.findAll());
System.out.println("\n\n\n\n");
long index = productRepository.count()+1;
Expand All @@ -116,5 +116,6 @@ public void addDefaultProducts(){
productRepository.save(p);
}
}
return "Default products added successfully!";
}
}

0 comments on commit f7b9ed2

Please sign in to comment.