func (VS *Server) updateCategoryItems(c *gin.Context, catID bson.ObjectId, i Item) {
	cat := VS.getCategoryByID(c, catID, "h_database", "updateCategoryItems", "cat := VS.getCategoryByID")
	cat.Items = append(cat.Items, i.ID)
	VS.addCategoryToDatabase(c, cat, "h_database", "updateCategoryItems", "VS.addCategoryToDatabase")
	items := VS.getAllItemsByCategory(c, cat.ID, "h_database", "updateCategoryItems", "items := VS.getAllItemsByCategory")
	cate := VS.getCategoryByID(c, cat.ID, "h_database", "updateCategoryItems", "cate := VS.getCategoryByID")
	cate.Items = nil
	bubbleSort(items)
	for _, i := range items {
		cate.Items = append(cate.Items, i.ID)
	}
	VS.addCategoryToDatabase(c, cate, "h_database", "updateCategoryItems", "items := VS.getAllItemssByCategory")
}
// This method update the items inside the category
This method update the items inside the category
// This method update the items inside the category
func (VS *Server) updateCategoryItems(c *gin.Context, catID bson.ObjectId, i Item) {
	cat := VS.getCategoryByID(c, catID, "h_database", "updateCategoryItems", "cat := VS.getCategoryByID")
	cat.Items = append(cat.Items, i.ID)
	VS.addCategoryToDatabase(c, cat, "h_database", "updateCategoryItems", "VS.addCategoryToDatabase")
	items := VS.getAllItemsByCategory(c, cat.ID, "h_database", "updateCategoryItems", "items := VS.getAllItemsByCategory")
	cate := VS.getCategoryByID(c, cat.ID, "h_database", "updateCategoryItems", "cate := VS.getCategoryByID")
	cate.Items = nil
	bubbleSort(items)
	for _, i := range items {
		cate.Items = append(cate.Items, i.ID)
	}
	VS.addCategoryToDatabase(c, cate, "h_database", "updateCategoryItems", "items := VS.getAllItemssByCategory")
}
func ( VS * Server ) updateCategoryItems ( c * gin . Context , catID bson . ObjectId , i Item ) { cat := VS . getCategoryByID ( c , catID , " " , " " , " " ) cat . Items = append ( cat . Items , i . ID ) VS . addCategoryToDatabase ( c , cat , " " , " " , " " ) items := VS . getAllItemsByCategory ( c , cat . ID , " " , " " , " " ) cate := VS . getCategoryByID ( c , cat . ID , " " , " " , " " ) cate . Items = nil bubbleSort ( items ) for _ , i := range items { cate . Items = append ( cate . Items , i . ID ) } VS . addCategoryToDatabase ( c , cate , " " , " " , " " ) }
This method update the items inside the category
This method update the items inside the category