diff --git a/InsecureWebApp/Pages/Shared/_FooterPartial.cshtml b/InsecureWebApp/Pages/Shared/_FooterPartial.cshtml
index 43296bb..01a44e4 100644
--- a/InsecureWebApp/Pages/Shared/_FooterPartial.cshtml
+++ b/InsecureWebApp/Pages/Shared/_FooterPartial.cshtml
@@ -2,9 +2,9 @@
diff --git a/InsecureWebApp/Pages/Shared/_HeaderPartial.cshtml b/InsecureWebApp/Pages/Shared/_HeaderPartial.cshtml
index 890a39e..b9cbd2e 100644
--- a/InsecureWebApp/Pages/Shared/_HeaderPartial.cshtml
+++ b/InsecureWebApp/Pages/Shared/_HeaderPartial.cshtml
@@ -104,7 +104,7 @@
diff --git a/InsecureWebApp/wwwroot/js/components/NewProducts.js b/InsecureWebApp/wwwroot/js/components/NewProducts.js
index aee147e..1097f15 100644
--- a/InsecureWebApp/wwwroot/js/components/NewProducts.js
+++ b/InsecureWebApp/wwwroot/js/components/NewProducts.js
@@ -13,6 +13,9 @@ $.fn.NewProducts = function (options) {
$.each(response, function (i, row) {
product = _productDiv(row);
$data.append(product);
+ if (i == (settings.limit-1)) {
+ return false;
+ }
});
} else {
$data.append("
No products found
");
@@ -34,7 +37,7 @@ $.fn.NewProducts = function (options) {
return productDiv;
}
async function _getProducts(limit) {
- return await $.get(`/api/v1/products?limit=${limit}`).then();
+ return await $.get(`/api/v1/products/getproducts?limit=${limit}`).then();
}
};
\ No newline at end of file