mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-24 18:32:41 +00:00
Fixed what was breaking
This commit is contained in:
@@ -38,7 +38,7 @@ const junkBrewQuery = HomebrewModel.find({
|
||||
/* Search for brews that aren't compressed (missing the compressed text field) */
|
||||
const uncompressedBrewQuery = HomebrewModel.find({
|
||||
'textBin' : null
|
||||
}).limit(50);
|
||||
}).lean().limit(50).select('_id');
|
||||
|
||||
router.get('/admin/cleanup', mw.adminOnly, (req, res)=>{
|
||||
junkBrewQuery.exec((err, objs)=>{
|
||||
@@ -68,6 +68,9 @@ router.get('/admin/lookup/:id', mw.adminOnly, (req, res, next)=>{
|
||||
router.get('/admin/finduncompressed', mw.adminOnly, (req, res)=>{
|
||||
uncompressedBrewQuery.exec((err, objs)=>{
|
||||
if(err) return res.status(500).send(err);
|
||||
console.log(objs);
|
||||
objs = objs.map((obj)=>{return obj._id});
|
||||
console.log(objs);
|
||||
return res.json({ count: objs.length, ids: objs });
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user