0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 18:32:41 +00:00

Simplify Admin brew lookup function

This commit is contained in:
G.Ambatte
2024-11-10 20:19:30 +13:00
parent 033b7fa44f
commit 2dafbf2080

View File

@@ -71,8 +71,7 @@ router.post('/admin/cleanup', mw.adminOnly, (req, res)=>{
/* Searches for matching edit or share id, also attempts to partial match */
router.get('/admin/lookup/:id', mw.adminOnly, asyncHandler(HomebrewAPI.getBrew('admin', false)), async (req, res, next)=>{
const brew = req?.brew ?? undefined;
return res.json(brew);
return res.json(req.brew);
});
/* Find 50 brews that aren't compressed yet */