Open jillytot opened 4 years ago
from ged:
incase someone doesn't send a proper body you should put if (!req.body) return res.json({error: 'no'}) or something at the top of all your routes that use req.body res.status(400).json({error: 'no body'})
Status codes need to be handled on the web client as well.
from ged:
incase someone doesn't send a proper body you should put if (!req.body) return res.json({error: 'no'}) or something at the top of all your routes that use req.body res.status(400).json({error: 'no body'})