func (VS *Server) newAnimal(c *gin.Context) {
	service, b := VS.getOurService(c, "h_slaughterhouse", "newAnimal", "service, b := VS.getOurService")
	if !b {
		return
	}
	a, b := VS.getParamFromURL(c, "animal")
	if !b {
		return
	}
	animalType := AnimalType(a)
	id := bson.NewObjectId()
	front, b := VS.getPhotoFromHTML(c, "FRONT", "Animal", "/local-resources/slaughterhouse/animals/"+id.Hex()+"/")
	if !b {
		return
	}
	back, b := VS.getPhotoFromHTML(c, "BACK", "Animal", "/local-resources/slaughterhouse/animals/"+id.Hex()+"/")
	if !b {
		return
	}
	right, b := VS.getPhotoFromHTML(c, "RIGHT", "Animal", "/local-resources/slaughterhouse/animals/"+id.Hex()+"/")
	if !b {
		return
	}
	left, b := VS.getPhotoFromHTML(c, "LEFT", "Animal", "/local-resources/slaughterhouse/animals/"+id.Hex()+"/")
	if !b {
		return
	}

	animal := Animal{
		ID:         id,
		Front:      front,
		Back:       back,
		Right:      right,
		Left:       left,
		IsClosed:   false,
		AnimalType: animalType,
	}
	VS.addElementToDatabaseWithRegister(c, animal, animal.ID, service.ID, "h_slaughterhouse", "newAnimal", "VS.addAnimalToDatabase")
	VS.goodFeedback(c, "slaughterhouse/animals")
}
// Shows the animals to slaughter
Shows the animals to slaughter
// Shows the animals to slaughter
func (VS *Server) newAnimal(c *gin.Context) {
	service, b := VS.getOurService(c, "h_slaughterhouse", "newAnimal", "service, b := VS.getOurService")
	if !b {
		return
	}
	a, b := VS.getParamFromURL(c, "animal")
	if !b {
		return
	}
	animalType := AnimalType(a)
	id := bson.NewObjectId()
	front, b := VS.getPhotoFromHTML(c, "FRONT", "Animal", "/local-resources/slaughterhouse/animals/"+id.Hex()+"/")
	if !b {
		return
	}
	back, b := VS.getPhotoFromHTML(c, "BACK", "Animal", "/local-resources/slaughterhouse/animals/"+id.Hex()+"/")
	if !b {
		return
	}
	right, b := VS.getPhotoFromHTML(c, "RIGHT", "Animal", "/local-resources/slaughterhouse/animals/"+id.Hex()+"/")
	if !b {
		return
	}
	left, b := VS.getPhotoFromHTML(c, "LEFT", "Animal", "/local-resources/slaughterhouse/animals/"+id.Hex()+"/")
	if !b {
		return
	}
	animal := Animal{
		ID:         id,
		Front:      front,
		Back:       back,
		Right:      right,
		Left:       left,
		IsClosed:   false,
		AnimalType: animalType,
	}
	VS.addElementToDatabaseWithRegister(c, animal, animal.ID, service.ID, "h_slaughterhouse", "newAnimal", "VS.addAnimalToDatabase")
	VS.goodFeedback(c, "slaughterhouse/animals")
}
func ( VS * Server ) newAnimal ( c * gin . Context ) { service , b := VS . getOurService ( c , " " , " " , " " ) if ! b { return } a , b := VS . getParamFromURL ( c , " " ) if ! b { return } animalType := AnimalType ( a ) id := bson . NewObjectId ( ) front , b := VS . getPhotoFromHTML ( c , " " , " " , " " + id . Hex ( ) + " " ) if ! b { return } back , b := VS . getPhotoFromHTML ( c , " " , " " , " " + id . Hex ( ) + " " ) if ! b { return } right , b := VS . getPhotoFromHTML ( c , " " , " " , " " + id . Hex ( ) + " " ) if ! b { return } left , b := VS . getPhotoFromHTML ( c , " " , " " , " " + id . Hex ( ) + " " ) if ! b { return } animal := Animal { ID : id , Front : front , Back : back , Right : right , Left : left , IsClosed : false , AnimalType : animalType , } VS . addElementToDatabaseWithRegister ( c , animal , animal . ID , service . ID , " " , " " , " " ) VS . goodFeedback ( c , " " ) }
Shows the animals to slaughter
Shows the animals to slaughter