0
0
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:
G.Ambatte
2024-06-12 21:47:52 +12:00
parent 24cf78bc03
commit c594fc58b3

View File

@@ -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}` });