0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 14:12:40 +00:00

Comment out server-side brew version checking

Requires client-side update to apply brew version correctly; temporarily disabling server-side checking for a few days until more users have updated their clients.
This commit is contained in:
Trevor Buckner
2023-01-03 12:38:00 -05:00
committed by GitHub
parent 7aac377ce8
commit 4fe0f1a7af

View File

@@ -193,10 +193,10 @@ const newBrew = async (req, res)=>{
const updateBrew = async (req, res)=>{
// Initialize brew from request and body, destructure query params, set a constant for the google id, and set the initial value for the after-save method
const brewFromClient = excludePropsFromUpdate(req.body);
if(req.brew.version && brewFromClient.version && req.brew.version > brewFromClient.version) {
res.setHeader('Content-Type', 'application/json');
return res.status(409).send(JSON.stringify({ message: `The brew has been changed on a different device. Please save your changes elsewhere, refresh, and try again.` }));
}
//if(req.brew.version && brewFromClient.version && req.brew.version > brewFromClient.version) {
// res.setHeader('Content-Type', 'application/json');
// return res.status(409).send(JSON.stringify({ message: `The brew has been changed on a different device. Please save your changes elsewhere, refresh, and try again.` }));
//}
let brew = _.assign(req.brew, brewFromClient);
const { saveToGoogle, removeFromGoogle } = req.query;