// Update updates an existing chocolate
func (s *ChocolateStorage) Update(c model.Chocolate) error {
	var choc model.Chocolate
	s.db.First(&choc, c.ID)
	if err := s.db.Error; err == gorm.ErrRecordNotFound {
		return fmt.Errorf("Chocolate with id %s does not exist", c.ID)
	} else if err != nil {
		return err
	}
	choc.Name = c.Name
	choc.Taste = c.Taste
	s.db.Save(&choc)
	return s.db.Error
}
// Insert a fresh one
func (s *ChocolateStorage) Insert(c model.Chocolate) string {
	s.db.Create(&c)
	return c.GetID()
}