Adding req to the create and update functions.