Skip to content

Commit

Permalink
Merge branch 'ps/issue54' into 'develop'
Browse files Browse the repository at this point in the history
Fix: Add validation message Add NFT button

See merge request PBSA/dapps/NFT-store!9
  • Loading branch information
RoshanSyed committed Jun 3, 2021
2 parents 499668d + 602324b commit 9a872a6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions routes/product.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,12 @@ router.post('/customer/product/insert', upload.single("productImage"), async (re
const schemaValidate = validateJson('newProduct', doc);
if(!schemaValidate.result){
if(process.env.NODE_ENV !== 'test'){
console.log('schemaValidate errors', schemaValidate.errors);
console.log('schemaValidate error', schemaValidate.errors);
}
res.status(400).json(schemaValidate.errors);
res.status(400).json({
message: 'Provide inputs at all mandatory fields should be displayed',
error: schemaValidate.errors
});
return;
}

Expand Down

0 comments on commit 9a872a6

Please sign in to comment.