const EmployeeController = { store(req, res) { if(!req.body.name) { res.status(400); res.json({ success: false, message: 'Bad request' }); } res.status(200) res.json(req.body.name ); }, delete(req, res) { if(!req.params.id) { res.status(400); res.json({ success: false, message: 'Bad request' }); } res.status(200); res.json(req.params.id); }, update(req, res) { if(!req.params.id || !req.body.name) { res.status(400); res.json({ success: false, message: 'Bad request' }); } res.status(201); res.json({ id: req.params.id, name: req.body.name}); } } module.exports = EmployeeController;