remotv / remo-platform-server

15 stars 9 forks source link

Remo Platform - better req.body handling on incoming requests #2

Open jillytot opened 4 years ago

jillytot commented 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'})

jillytot commented 4 years ago

Status codes need to be handled on the web client as well.