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