Implemented the delete action with route.