add update() method for ContentsController;