Added a search page
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
Gregory Ballantine 2024-05-21 10:23:46 -04:00
parent 1118283cb7
commit be408865cf

View File

@ -9,7 +9,7 @@ exports.getSearch = async function(req, res) {
let query = req.params.query; let query = req.params.query;
// fetch inventory items from database based on search query // fetch inventory items from database based on search query
const results = await Item.find({ const results = await Item.findAll({
where: { where: {
name: { name: {
[Op.like]: query, [Op.like]: query,