access body prop before desc

This commit is contained in:
np.w
2020-12-12 18:28:55 -06:00
parent f3da826395
commit a912fb2836
2 changed files with 15 additions and 13 deletions
+1 -1
View File
@@ -86,7 +86,7 @@ app.put('/box/:boxId/item/:itemId', async (request, response) => {
await Box.updateOne({ '_id': boxID, 'item._id': itemID }, {
$set: {
'item.$.name': request.body.name,
'item.$.description': request.description
'item.$.description': request.body.description
}
})
const updatedBox = await getBox(boxID);