mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-26 09:32:51 +00:00
Add return on success to lock route
This commit is contained in:
@@ -182,9 +182,12 @@ router.post('/admin/lock/:id', mw.adminOnly, async (req, res)=>{
|
||||
await brew.save();
|
||||
|
||||
console.log(`Lock applied to brew ID ${brew.shareId} - ${brew.title}`);
|
||||
} catch {}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
return res.status(500).json({ error: `Unable to set lock on brew ${req.params.id}` });
|
||||
}
|
||||
|
||||
return;
|
||||
return res.status(200).json({ status: 'SUCCESS', lock });
|
||||
});
|
||||
|
||||
router.get('/admin/lock/reviews', mw.adminOnly, async (req, res)=>{
|
||||
|
||||
Reference in New Issue
Block a user