فهرست منبع

set includedAppId of apiPlugins

Anthony Woods 10 سال پیش
والد
کامیت
fd52320460
1فایلهای تغییر یافته به همراه12 افزوده شده و 0 حذف شده
  1. 12 0
      pkg/plugins/app_plugin.go

+ 12 - 0
pkg/plugins/app_plugin.go

@@ -59,6 +59,18 @@ func (app *AppPlugin) Load(decoder *json.Decoder, pluginDir string) error {
 		}
 		}
 	}
 	}
 
 
+	// check if we have child apiPlugins
+	for _, plugin := range ApiPlugins {
+		if strings.HasPrefix(plugin.PluginDir, app.PluginDir) {
+			plugin.IncludedInAppId = app.Id
+			app.Includes = append(app.Includes, AppIncludeInfo{
+				Name: plugin.Name,
+				Id:   plugin.Id,
+				Type: plugin.Type,
+			})
+		}
+	}
+
 	Apps[app.Id] = app
 	Apps[app.Id] = app
 	return nil
 	return nil
 }
 }