diff --git a/assets/js/nechryael.js b/assets/js/nechryael.js index 847577c..2144ea4 100644 --- a/assets/js/nechryael.js +++ b/assets/js/nechryael.js @@ -1,7 +1,5 @@ $(document).ready(function() { - console.log('Document is ready!'); - - $('#filter-limiter').on('change', () => { + $('#filter-limit').on('change', () => { $('#filter-form').submit(); }); }); diff --git a/src/routes/home.js b/src/routes/home.js index ad4bb3c..ff102d3 100644 --- a/src/routes/home.js +++ b/src/routes/home.js @@ -5,10 +5,9 @@ const License = db.licenses; // GET - / exports.getIndex = async function(req, res) { // check if there's a limit set - if (isset(req.body['limit'])) { - const limit = req.body.limit; - } else { - const limit = 10; + let limit = 10; // default to 10 results + if ('limit' in req.query) { + const limit = req.query.limit; } // fetch inventory items from database diff --git a/views/index.twig b/views/index.twig index 07cb6a9..839e622 100644 --- a/views/index.twig +++ b/views/index.twig @@ -85,13 +85,13 @@
-
+