Commit ea81d1ef authored by Christopher Cottier's avatar Christopher Cottier

working delete route, CRUD application functional for basic routes

parent 57d6fe7f
......@@ -43,7 +43,7 @@ public class ProductController {
@DeleteMapping("/products/{id}")
@ResponseStatus(HttpStatus.OK)
public void deleteProduct(@PathVariable String id){
productService.deleteProduct(id);
productService.deleteProduct(id).subscribe();
}
......
......@@ -38,8 +38,7 @@ public class ProductService {
}
public void deleteProduct(String id) {
Mono<Product> productToDelete = productRepository.findById(id);
productRepository.deleteById(id);
public Mono<Void> deleteProduct(String id) {
return productRepository.deleteById(id);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment