Versie module 1 van 26-7
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
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();
|
||||
Reference in New Issue
Block a user