async delete(req, res) { if(!req.params.id) { res.status(400); res.json({ success: false, message: 'Bad request' }); } const id = req.params.id; const deletedEmployee = await Employee.findByIdAndDelete(id); res.status(200); res.json({ success: true, data: deletedEmployee, message: 'Ok' }); },