diff --git a/backend/app.js b/backend/app.js index 50ac325..22a075d 100644 --- a/backend/app.js +++ b/backend/app.js @@ -207,8 +207,8 @@ app.get('/api/getitems', (req, res, next) => { }); app.post('/api/item', (req, res, next) => { - console.log('Post: /api/item'); - if ( req.body.item._id == '' ) { + console.log('Post: /api/item', req.body.item); + if ( req.body.item._id == null ) { const item = new itemmodel(req.body.item); item.save(); res.status(201).json({