refactor(rest) onDelete