mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-13 06:32:39 +00:00
New brew search finished on admin page
This commit is contained in:
@@ -46,11 +46,8 @@ router.delete('/admin/invalid', mw.adminOnly, (req, res, next)=>{
|
||||
});
|
||||
|
||||
router.get('/admin/lookup/:search', mw.adminOnly, (req, res, next) => {
|
||||
//search for mathcing edit id
|
||||
//search for matching share id
|
||||
// search for partial match
|
||||
|
||||
BrewData.get({ $or:[
|
||||
//Searches for partial matches on either edit or share
|
||||
{editId : { "$regex": req.params.search, "$options": "i" }},
|
||||
{shareId : { "$regex": req.params.search, "$options": "i" }},
|
||||
]})
|
||||
|
||||
Reference in New Issue
Block a user