{"size": 376, "ext": "js", "max_stars_repo_path": "src/controllers/employees/deleteByIdEmployee.js", "max_stars_repo_name": "murilorsv14/SSYS-Employee-Manager-API", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/controllers/employees/deleteByIdEmployee.js", "max_issues_repo_name": "murilorsv14/SSYS-Employee-Manager-API", "max_issues_repo_issues_event_min_datetime": "2022-03-30T18:23:12.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-30T18:23:12.000Z", "max_forks_repo_path": "src/controllers/employees/deleteByIdEmployee.js", "max_forks_repo_name": "murilorsv14/SSYS-Employee-Manager-API", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 25.0666666667, "max_line_length": 59, "alphanum_fraction": 0.6515957447}
const { StatusCodes } = require('http-status-codes');
const { deleteById } = require('../../services/employees');

const deleteOneEmployee = async (req, res, next) => {
  const { id } = req.params;
  try {
    await deleteById(id);
    return res.status(StatusCodes.NO_CONTENT).json({});
  } catch (error) {
    return next(error);
  }
};

module.exports = deleteOneEmployee;
