26 lines
297 B
JavaScript
26 lines
297 B
JavaScript
const ProductRepository =
|
|
require("../repositories/ProductRepository");
|
|
|
|
|
|
class ProductService {
|
|
|
|
|
|
getProducts() {
|
|
|
|
return ProductRepository.getAll();
|
|
|
|
}
|
|
|
|
|
|
createProduct(data) {
|
|
|
|
return ProductRepository.create(data);
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
module.exports =
|
|
new ProductService(); |