Commit 06946133 authored by Ben Anderson's avatar Ben Anderson

Fixed incorrect collection reference in Model

parent 194e8d3a
......@@ -8,7 +8,7 @@ import org.springframework.data.mongodb.core.mapping.Document;
@Getter
@Setter
@Document(collection = "Products")
@Document(collection = "products")
public class Product {
@Id
private String id;
......
......@@ -13,9 +13,9 @@ public class ProductService {
ProductRepository productRepository;
public Mono<ProductDto> createProduct(Product product) {
// TODO: Add explicit check for existing SKU
return productRepository.save(product)
.map(ProductDto::generateDtoFromProduct)
.onErrorMap(throwable -> throwable);
}
}
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