func (VS *Server) newType(c *gin.Context) {
	categoryType, b := VS.getNewCategoryType(c, bson.NewObjectId())
	if !b {
		return
	}
	if VS.addCategoryTypeToDatabase(c, categoryType, "h_data", "newType", "VS.addCategoryTypeToDatabase") {
		VS.registerAddDatabaseMovementFromCentral(c, categoryType, categoryType.ID)
		VS.goodFeedback(c, "/data/categories")
	} else {
		VS.wrongFeedback(c, "Sorry, there is already one Category Type with that name. Please choose another name ")
	}
}
// Stores the new CategoryType information into the DataBase
Stores the new CategoryType information into the DataBase
// Stores the new CategoryType information into the DataBase
func (VS *Server) newType(c *gin.Context) {
	categoryType, b := VS.getNewCategoryType(c, bson.NewObjectId())
	if !b {
		return
	}
	if VS.addCategoryTypeToDatabase(c, categoryType, "h_data", "newType", "VS.addCategoryTypeToDatabase") {
		VS.registerAddDatabaseMovementFromCentral(c, categoryType, categoryType.ID)
		VS.goodFeedback(c, "/data/categories")
	} else {
		VS.wrongFeedback(c, "Sorry, there is already one Category Type with that name. Please choose another name ")
	}
}
func ( VS * Server ) newType ( c * gin . Context ) { categoryType , b := VS . getNewCategoryType ( c , bson . NewObjectId ( ) ) if ! b { return } if VS . addCategoryTypeToDatabase ( c , categoryType , " " , " " , " " ) { VS . registerAddDatabaseMovementFromCentral ( c , categoryType , categoryType . ID ) VS . goodFeedback ( c , " " ) } else { VS . wrongFeedback ( c , " " ) } }
Stores the new CategoryType information into the DataBase
Stores the new CategoryType information into the DataBase