mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-26 16:02:38 +00:00
Spread lock object in /lock response
This commit is contained in:
@@ -179,7 +179,7 @@ router.post('/admin/lock/:id', mw.adminOnly, async (req, res)=>{
|
||||
await brew.save();
|
||||
|
||||
// console.log(`Lock applied to brew ID ${brew.shareId} - ${brew.title}`);
|
||||
return res.json({ status: 'LOCKED', detail: `Lock applied to brew ID ${brew.shareId} - ${brew.title}`, lock });
|
||||
return res.json({ status: 'LOCKED', detail: `Lock applied to brew ID ${brew.shareId} - ${brew.title}`, ...lock });
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
return res.json({ status: 'ERROR', error, message: `Unable to set lock on brew ${req.params.id}` });
|
||||
|
||||
Reference in New Issue
Block a user