0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-09 13:42:38 +00:00

fix getBrew issue

This commit is contained in:
Charlie Humphreys
2022-09-08 08:15:55 -05:00
parent af1821e697
commit a234fdbab7

View File

@@ -268,8 +268,8 @@ const deleteGoogleBrew = async (account, id, editId, res)=>{
const deleteBrew = async (req, res, next)=>{ const deleteBrew = async (req, res, next)=>{
try { try {
req.brew = await getBrew('edit')(req, res, next); await getBrew('edit')(req, res, next);
} catch (e) { } catch (err) {
const { id, googleId } = getId(req); const { id, googleId } = getId(req);
console.warn(`No google brew found for id ${googleId}, the stub will be deleted.`); console.warn(`No google brew found for id ${googleId}, the stub will be deleted.`);
await HomebrewModel.deleteOne({ editId: id }); await HomebrewModel.deleteOne({ editId: id });