From 50b7c6d1382c7f3cabde1a698d33541fc01d473c Mon Sep 17 00:00:00 2001 From: Yeuoly Date: Mon, 9 Sep 2024 12:06:27 +0800 Subject: [PATCH] feat: plugin install --- internal/server/controllers/plugins.go | 9 +++++++++ internal/server/middleware.go | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/internal/server/controllers/plugins.go b/internal/server/controllers/plugins.go index db63a1b..37bba8d 100644 --- a/internal/server/controllers/plugins.go +++ b/internal/server/controllers/plugins.go @@ -18,3 +18,12 @@ func GetAsset(c *gin.Context) { c.Data(http.StatusOK, "application/octet-stream", asset) } + +func InstallPlugin(c *gin.Context) { +} + +func UninstallPlugin(c *gin.Context) { +} + +func ListPlugins(c *gin.Context) { +} diff --git a/internal/server/middleware.go b/internal/server/middleware.go index bff8777..3d7b9e4 100644 --- a/internal/server/middleware.go +++ b/internal/server/middleware.go @@ -70,7 +70,7 @@ func (app *App) RedirectPluginInvoke() gin.HandlerFunc { func (app *App) redirectPluginInvokeByPluginID(ctx *gin.Context, plugin_id plugin_entities.PluginUniqueIdentifier) { // try find the correct node - nodes, err := app.cluster.FetchPluginAvailableNodesById(plugin_id.PluginID()) + nodes, err := app.cluster.FetchPluginAvailableNodesById(plugin_id.String()) if err != nil { ctx.AbortWithStatusJSON(500, gin.H{"error": "Internal server error"}) log.Error("fetch plugin available nodes failed: %s", err.Error())