refactored POST and PUT for itemController. Implemented save() method to replace post() and put(). save() handles both requests and keeps the class dry-er