Implemented the delete action for posts