function remove(req, res, next) {
  const entity = req.entity;
  entity.remove()
    .then(deletedEntity => res.json(deletedEntity))
    .catch(e => next(e));