Fixed search limiter
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
Gregory Ballantine
2024-05-24 12:47:57 -04:00
parent d95be2e185
commit c652e089d5
3 changed files with 10 additions and 13 deletions

View File

@ -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