Added update method insider UserRepository and the controller.