0
0
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:
Scott Tolksdorf
2017-01-28 16:35:48 -05:00
parent 7e6f42f062
commit 6030134de2
15 changed files with 117 additions and 396 deletions

View File

@@ -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" }},
]})