// DeleteAppGroup handles DELETE /app-groups/<group_id> api endpoint
DeleteAppGroup handles DELETE /app-groups/ api endpoint
// DeleteAppGroup handles DELETE / app - groups / <group_id > api endpoint
func DeleteAppGroup(c *routing.Context) error {
	appGroupID := c.Param("group_id")
	if !bson.IsObjectIdHex(string(appGroupID)) {
		return http.Error(c, "Group id not valid.", 400, ServiceDiscoveryServiceName())
	}
	appGroupService, err := getAppGroupService(c)
	if err != nil {
		return http.Error(c, err.Error(), 400, ServiceDiscoveryServiceName())
	}
	err = appGroupService.DeleteApplicationGroup(appGroupID)
	if err != nil {
		http.Response(c, `{"error" : true, "msg": `+strconv.Quote(err.Error())+`}`, 400, ServiceDiscoveryServiceName(), config.APPLICATION_JSON)
		return nil
	}
	http.Response(c, `{"error" : false, "msg": "Applications group removed successfuly."}`, 200, ServiceDiscoveryServiceName(), config.APPLICATION_JSON)
	return nil
}
func DeleteAppGroup ( c * routing . Context ) error { appGroupID := c . Param ( " " ) if ! bson . IsObjectIdHex ( string ( appGroupID ) ) { return http . Error ( c , " " , 400 , ServiceDiscoveryServiceName ( ) ) } appGroupService , err := getAppGroupService ( c ) if err != nil { return http . Error ( c , err . Error ( ) , 400 , ServiceDiscoveryServiceName ( ) ) } err = appGroupService . DeleteApplicationGroup ( appGroupID ) if err != nil { http . Response ( c , `{"error" : true, "msg": ` + strconv . Quote ( err . Error ( ) ) + `}` , 400 , ServiceDiscoveryServiceName ( ) , config . APPLICATION_JSON ) return nil } http . Response ( c , `{"error" : false, "msg": "Applications group removed successfuly."}` , 200 , ServiceDiscoveryServiceName ( ) , config . APPLICATION_JSON ) return nil }
DeleteAppGroup handles DELETE /app-groups/ api endpoint
DeleteAppGroup handles DELETE / app - groups / api endpoint
// Get application group service