added update method to food and post controller