35 lines
388 B
JavaScript
35 lines
388 B
JavaScript
const ProductService =
|
|
require("../services/ProductService");
|
|
|
|
|
|
class ProductController {
|
|
|
|
|
|
index(req,res) {
|
|
|
|
|
|
const products =
|
|
ProductService.getProducts();
|
|
|
|
|
|
res.render(
|
|
"products/index",
|
|
{
|
|
|
|
title:"Producten",
|
|
|
|
products
|
|
|
|
}
|
|
);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
module.exports =
|
|
new ProductController(); |