fix the delete action for the /posts template & controller